code: def _check_type(self):
          '''Check that the device group type is correct.
  
          :raises: DeviceGroupOperationNotSupported, DeviceGroupNotSupported
          '''
  
          if self.type not in self.available_types:
              msg = 'Unsupported cluster type was given: %s' % self.type
              raise DeviceGroupNotSupported(msg)
          elif self.type == 'sync-only' and self.name != 'device_trust_group':
              msg = "Management of sync-only device groups only supported for " \
                  "built-in device group named 'device_trust_group'"
              raise DeviceGroupNotSupported(msgf _check_type(self):
          '''Check that the device group type is correct.
  
          :raises: DeviceGroupOperationNotSupported, DeviceGroupNotSupported
          '''
  
          if self.type not in self.available_types:
              msg = 'Unsupported cluster type was given: %s' % self.type
              raise DeviceGroupNotSupported(msg)
          elif self.type == 'sync-only' and self.name != 'device_trust_group':
              msg = "Management of sync-only device groups only supported for " \
                  "built-in device group named 'device_trust_group'"
              raise DeviceGroupNotSupported(msg)
docs: Check that the device group type is correct.
  
          :raises: DeviceGroupOperationNotSupported, DeviceGroupNotSupported