code: def _delete_device_from_device_group(self, device):
          '''Remove device from device service cluster group.
  
          :param device: ManagementRoot object -- device to delete from group
          '''
  
          device_name = get_device_info(device).name
          dg = pollster(self._get_device_group)(device)
          device_to_remove = dg.devices_s.devices.load(
              name=device_name, partition=self.partition
          )
          device_to_remove.delete(f _delete_device_from_device_group(self, device):
          '''Remove device from device service cluster group.
  
          :param device: ManagementRoot object -- device to delete from group
          '''
  
          device_name = get_device_info(device).name
          dg = pollster(self._get_device_group)(device)
          device_to_remove = dg.devices_s.devices.load(
              name=device_name, partition=self.partition
          )
          device_to_remove.delete()
docs: Remove device from device service cluster group.
  
          :param device: ManagementRoot object -- device to delete from group