human
I wrote the below code

    def check_url(value):
        validate(text, value)
        parsed = urlparse(value)
        if (not parsed.netloc):
            raise ValueError("'{0}'    is    not    a    valid    URL".format(value))
        for (name, schema) in attributes.items():
            if (not _hasattr(parsed, name)):
                raise ValueError("Invalid    URL    attribute    '{0}'".format(name))
            try:
                validate(schema, _getattr(parsed, name))
            except ValueError as err:
                raise ValueError("Unable    to    validate    URL    attribute    '{0}':    {1}".format(name, err))
        return True
    if (attributes.get('scheme') == 'http'):
        attributes['scheme'] = any('http', 'https')
    return check_url

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def url(**attributes):