human
Complete this python program:
def is_type_factory(_type):
assistant
#Here is the Python code you requested.

    """Parameters
    `_type` - a type to be compared against (e.g. type(x) == `_type`)
    Returns
    validator - a function of a single argument x , which raises
    ValueError if type(x) is not equal to `_type`
    """
    def inner(x):
        if (type(x) != _type):
            raise ValueError(("Value    must    have    type    '%s'" % str(_type)))
    return inner