code: def iterate_elements(parent):
          
          element = parent.firstChild
          while element is not None:
              yield element
              element = element.nextSibling
docs: Helper function that iterates over child Nodes/Elements of parent Node/Element.
  
          :param parent: object of Element class, representing parent element.