human
I wrote the below code

    if isinstance(module, python.str_types):
        if (module == ''):
            raise TypeError(('Cannot    get    list    of    classes    from    %r' % (module,)))
        package = module
        module = None
    if (module is None):
        import inspect
        prev_frame = inspect.stack()[1][0]
        module = prev_frame.f_locals
    if (type(module) is dict):
        has = (lambda x: (x in module))
        get = module.__getitem__
    elif (type(module) is list):
        has = (lambda x: (x in module))
        get = module.__getitem__
        strict = False
    else:
        has = (lambda x: hasattr(module, x))
        get = (lambda x: getattr(module, x))
    if (package is None):
        if has('__name__'):
            package = get('__name__')
        else:
            raise TypeError(('Cannot    get    list    of    classes    from    %r' % (module,)))
    if has('__all__'):
        keys = get('__all__')
    elif hasattr(module, '__dict__'):
        keys = module.__dict__.keys()
    elif hasattr(module, 'keys'):
        keys = module.keys()
    elif isinstance(module, list):
        keys = range(len(module))
    else:
        raise TypeError(('Cannot    get    list    of    classes    from    %r' % (module,)))
    def check_attr(attr):
        if (not isinstance(attr, python.class_types)):
            return False
        if (attr.__name__ in ignore):
            return False
        try:
            if (strict and (attr.__module__ != get('__name__'))):
                return False
        except AttributeError:
            return False
        return True
    classes = filter(check_attr, [get(x) for x in keys])
    registered = {}
    for klass in classes:
        alias = ('%s%s%s' % (package, separator, klass.__name__))
        registered[klass] = register_class(klass, alias)
    return registered

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

def register_package(module=None, package=None, separator='.', ignore=[], strict=True):