code: def xml_compare(expected, found):
      
  
      # if comparing the same ET object
      if expected == found:
          return True
  
      # compare element attributes, ignoring order
      if set(expected.items()) != set(found.items()):
          return False
  
      # check for equal number of children
      expected_children = list(expected)
      found_children = list(found)
      if len(expected_children) != len(found_children):
          return False
  
      # compare children
      if not all([xml_compare(a, b) for a, b in zip(expected_children, found_children)]):
          return False
  
      # compare elements, if there is no text node, return True
      if (expected.text is None or expected.text.strip() == "") \
          and (found.text is None or found.text.strip() == ""):
          return True
      else:
          return expected.tag == found.tag and expected.text == found.text \
              and expected.attrib == found.attrib
docs: Checks equality of two ``ElementTree`` objects.
  
      :param expected: An ``ElementTree`` object.
      :param found: An ``ElementTree`` object.
      :return: ``Boolean``, whether the two objects are equal.