code: def _handle_location(self, location):
          
          if not isinstance(location, ElementTree.Element):
              element = self.find(location)
              if element is None:
                  raise ValueError("Invalid path!")
          else:
              element = location
          return element
docs: Return an element located at location with flexible args.
  
          Args:
              location: String xpath to use in an Element.find search OR
                  an Element (which is simply returned).
  
          Returns:
              The found Element.
  
          Raises:
              ValueError if the location is a string that results in a
              find of None.