human
I wrote the below code

    @wraps(fn)
    def from_xml(cls, xml_data, system, id_generator):
        xml_object = etree.fromstring(xml_data)
        next_include = xml_object.find('include')
        while (next_include is not None):
            system.error_tracker('WARNING:    the    <include>    tag    is    deprecated,    and    will    go    away.')
            file = next_include.get('file')
            parent = next_include.getparent()
            if (file is None):
                continue
            try:
                ifp = system.resources_fs.open(file)
                incxml = etree.XML(ifp.read())
                parent.insert(parent.index(next_include), incxml)
            except Exception:
                msg = ('Error    in    problem    xml    include:    %s' % etree.tostring(next_include, pretty_print=True))
                system.error_tracker(msg)
                parent = next_include.getparent()
                errorxml = etree.Element('error')
                messagexml = etree.SubElement(errorxml, 'message')
                messagexml.text = msg
                stackxml = etree.SubElement(errorxml, 'stacktrace')
                stackxml.text = traceback.format_exc()
                parent.insert(parent.index(next_include), errorxml)
            parent.remove(next_include)
            next_include = xml_object.find('include')
        return fn(cls, etree.tostring(xml_object), system, id_generator)
    return from_xml

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

def process_includes(fn):