human
Here's a good function header given the following:
I wrote the below code

    if (not hasattr(model, '_sa_class_manager')):
        raise TypeError('model    must    be    a    sqlalchemy    mapped    model')
    mapper = model._sa_class_manager.mapper
    field_args = (field_args or {})
    properties = ((p.key, p) for p in mapper.iterate_properties)
    if only:
        def find(name):
            if (extra_fields and (name in extra_fields)):
                return (name, FieldPlaceholder(extra_fields[name]))
            (column, path) = get_field_with_path(model, name, return_remote_proxy_attr=False)
            if (path and (not (is_relationship(column) or is_association_proxy(column)))):
                raise Exception('form    column    is    located    in    another    table    and    requires    inline_models:    {0}'.format(name))
            if is_association_proxy(column):
                return (name, column)
            relation_name = column.key
            if ((column is not None) and hasattr(column, 'property')):
                return (relation_name, column.property)
            raise ValueError(('Invalid    model    property    name    %s.%s' % (model, name)))
        properties = (find(x) for x in only)
    elif exclude:
        properties = (x for x in properties if (x[0] not in exclude))
    field_dict = {}
    for (name, p) in properties:
        if (ignore_hidden and name.startswith('_')):
            continue
        prop = _resolve_prop(p)
        field = converter.convert(model, mapper, name, prop, field_args.get(name), hidden_pk)
        if (field is not None):
            field_dict[name] = field
    if ((not only) and extra_fields):
        for (name, field) in iteritems(extra_fields):
            field_dict[name] = form.recreate_field(field)
    return type((model.__name__ + 'Form'), (base_class,), field_dict)

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

def get_form(model, converter, base_class=form.BaseForm, only=None, exclude=None, field_args=None, hidden_pk=False, ignore_hidden=True, extra_fields=None):