def METHOD_NAME(element, test_summary=None):
    """Recursively parse and extract a summary of a JUnit xml element tree.
    Args:
        element (xml.etree.Element): XML Element
        test_summary (dict): Summary of the JUnit XML report
    Returns:
        dict: Summary of Junit results.
    Notes:
        For JUnit XML schema see:
            <https://github.com/windyroad/JUnit-Schema>
    """
    # Create default entries in the stats dictionary if required.
    if not test_summary:
        test_summary = dict(
            testsuites=dict(tests=0, failures=0),
            testsuite=dict(tests=0, failures=0, skipped=0, errors=0),
            testcase=dict(tests=0, failures=0, skipped=0, errors=0),
        )
    # Parse top level <testsuites> or <testsuite> tags.
    if element.tag in ["testsuites", "testsuite"]:
        for attr in test_summary[element.tag]:
            test_summary[element.tag][attr] += int(element.get(attr, 0))
        for child in element:
            METHOD_NAME(child, test_summary)
    # Parse <testcase> tag. This is a child of testsuite.
    if element.tag == "testcase":
        key = "testcase"
        # Incrememnt test case counter.
        test_summary[key]["tests"] += 1
        # Parse child <error>, <skipped>, <failure> tags.
        for child in element:
            METHOD_NAME(child, test_summary)
    # Parse <error>, <skipped>, and <failure> tags. Children of testcase.
    if element.tag in ["error", "skipped", "failure"]:
        key = element.tag
        if element.tag == "error":
            key = "errors"
        elif element.tag == "failure":
            key = "failures"
        test_summary["testcase"][key] += 1
    # Parse <system-out>, <system-err>, and <properties> tags.
    # Children of testsuite.
    if element.tag in ["system-out", "system-err", "properties"]:
        pass
    return test_summary