human
I wrote the below code

    destination = (destination if destination else {})
    items = own_metadata(module)
    if (isinstance(module, DiscussionXBlock) and ('discussion_id' not in items)):
        items['discussion_id'] = module.discussion_id
    filtered_metadata = {k: v for (k, v) in items.iteritems() if (k not in FILTER_LIST)}
    destination[unicode(module.location)] = {'category': module.location.category, 'children': [unicode(child) for child in getattr(module, 'children', [])], 'metadata': filtered_metadata}
    if inherited:
        inherited_metadata_filter_list = list(filtered_metadata.keys())
        inherited_metadata_filter_list.extend(INHERITED_FILTER_LIST)
        def is_inherited(field):
            if (field.name in inherited_metadata_filter_list):
                return False
            elif (field.scope != Scope.settings):
                return False
            elif defaults:
                return True
            else:
                return (field.values != field.default)
        inherited_metadata = {field.name: field.read_json(module) for field in module.fields.values() if is_inherited(field)}
        destination[unicode(module.location)]['inherited_metadata'] = inherited_metadata
    for child in module.get_children():
        dump_module(child, destination, inherited, defaults)
    return destination

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

def dump_module(module, destination=None, inherited=False, defaults=False):