code: def get_elements(nodelist):
      
  
      element_list = []
      for node in nodelist:
          if node.nodeType == Node.ELEMENT_NODE:
              element_list.append(node)
  
      return element_list
docs: Return list of nodes that are ELEMENT_NODE