def METHOD_NAME(xml_filename, suite=None, results=None):
    with open(xml_filename) as f:
        etree = ElementTree.parse(f)
    root = etree.getroot()
    assert root.tag == 'testsuite'
    test_count = _get_test_counts(root)
    if suite is not None:
        assert len(root) == len(suite)
    if results is not None:
        run_tests_results = list(
            filter(lambda result: result.is_started(),
                   results.session.results.iter_test_results())
        )
        assert len(list(root)) == len(run_tests_results)
    test_case_tag_count = {'error': 0, 'failure': 0, 'skipped': 0}
    for child in list(root):
        assert child.tag == 'testcase'
        assert child.get('name')
        assert child.get('time')
        for subchild in iter(child):
            assert subchild.tag in ['skipped', 'error', 'failure']
            test_case_tag_count.update(
                {subchild.tag: test_case_tag_count[subchild.tag] + 1}
            )
    assert test_count['skipped'] == test_case_tag_count['skipped']
    assert test_count['failures'] == test_case_tag_count['failure']
    assert test_count['errors'] == test_case_tag_count['error']
    return root