def METHOD_NAME(root: ElementTree.Element,
                         node: ElementTree.Element,
                         xsd: str = '{http://www.w3.org/2001/XMLSchema}',
                         recursive_types: Iterable[str] = ['PeriodicEvent', 'SoloEvent', 'HaltEvent'],
                         folders: Iterable[str] = ['src', 'examples']) -> record_type:
    """Parse the xml schema at the current level
    Args:
        root (lxml.etree.Element): the root schema node
        node (lxml.etree.Element): current schema node
        xsd (str): the file namespace
        recursive_types (list): node tags that allow recursive nesting
        folders (list): folders to sort xml attribute usage into
    Returns:
        dict: Dictionary of attributes and children for the current node
    """
    element_type = node.get('type')
    element_name = node.get('name')
    element_def = root.find("%scomplexType[@name='%s']" % (xsd, element_type))
    local_types: record_type = {'attributes': {}, 'children': {}}
    # Parse attributes
    for attribute in element_def.findall('%sattribute' % (xsd)):
        attribute_name = attribute.get('name')
        local_types['attributes'][attribute_name] = {ka: [] for ka in folders}
        if ('default' in attribute.attrib):
            local_types['attributes'][attribute_name]['default'] = attribute.get('default')
    # Parse children
    choice_node = element_def.findall('%schoice' % (xsd))
    if choice_node:
        for child in choice_node[0].findall('%selement' % (xsd)):
            child_name = child.get('name')
            if not ((child_name in recursive_types) and (element_name in recursive_types)):
                local_types['children'][child_name] = METHOD_NAME(root, child)
    return local_types