code: def remove_object_from_list(self, obj, list_element):
          
          list_element = self._handle_location(list_element)
  
          if isinstance(obj, JSSObject):
              results = [item for item in list_element.getchildren() if
                         item.findtext("id") == obj.id]
          elif isinstance(obj, (int, basestring)):
              results = [item for item in list_element.getchildren() if
                         item.findtext("id") == str(obj) or
                         item.findtext("name") == obj]
  
          if len(results) == 1:
              list_element.remove(results[0])
          elif len(results) > 1:
              raise ValueError("There is more than one matching object at that "
                               "path!")
docs: Remove an object from a list element.
  
          Args:
              obj: Accepts JSSObjects, id's, and names
              list_element: Accepts an Element or a string path to that
                  element