code: def has_member(self, device_object):
          
          if device_object.tag == "computer":
              container_search = "computers/computer"
          elif device_object.tag == "mobile_device":
              container_search = "mobile_devices/mobile_device"
          else:
              raise ValueError
  
          return len([device for device in self.findall(container_search) if
                      device.findtext("id") == device_object.id]) is not 0
docs: Return bool whether group has a device as a member.
  
          Args:
              device_object (Computer or MobileDevice). Membership is
              determined by ID, as names can be shared amongst devices.