human
I wrote the below code

    def is_abstract(c):
        if (not hasattr(c, '__abstractmethods__')):
            return False
        if (not len(c.__abstractmethods__)):
            return False
        return True
    all_classes = []
    path = sklearn.__path__
    for (importer, modname, ispkg) in pkgutil.walk_packages(path=path, prefix='sklearn.', onerror=(lambda x: None)):
        if ('.tests.' in modname):
            continue
        module = __import__(modname, fromlist='dummy')
        classes = inspect.getmembers(module, inspect.isclass)
        all_classes.extend(classes)
    all_classes = set(all_classes)
    estimators = [c for c in all_classes if (issubclass(c[1], BaseEstimator) and (c[0] != 'BaseEstimator'))]
    estimators = [c for c in estimators if (not is_abstract(c[1]))]
    if (not include_dont_test):
        estimators = [c for c in estimators if (not (c[0] in DONT_TEST))]
    if (not include_other):
        estimators = [c for c in estimators if (not (c[0] in OTHER))]
    if (not include_meta_estimators):
        estimators = [c for c in estimators if (not (c[0] in META_ESTIMATORS))]
    if (type_filter is not None):
        if (not isinstance(type_filter, list)):
            type_filter = [type_filter]
        else:
            type_filter = list(type_filter)
        filtered_estimators = []
        filters = {'classifier': ClassifierMixin, 'regressor': RegressorMixin, 'transformer': TransformerMixin, 'cluster': ClusterMixin}
        for (name, mixin) in filters.items():
            if (name in type_filter):
                type_filter.remove(name)
                filtered_estimators.extend([est for est in estimators if issubclass(est[1], mixin)])
        estimators = filtered_estimators
        if type_filter:
            raise ValueError(("Parameter    type_filter    must    be    'classifier',    'regressor',    'transformer',    'cluster'    or    None,    got    %s." % repr(type_filter)))
    return sorted(set(estimators), key=itemgetter(0))

What's a good function header?

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

def all_estimators(include_meta_estimators=False, include_other=False, type_filter=None, include_dont_test=False):