code: def send_data_message(
              self,
              api_key=None,
              condition=None,
              collapse_key=None,
              delay_while_idle=False,
              time_to_live=None,
              restricted_package_name=None,
              low_priority=False,
              dry_run=False,
              data_message=None,
              content_available=None,
              timeout=5,
              json_encoder=None):
          
          if self:
              from .fcm import fcm_send_bulk_data_messages
  
              registration_ids = list(self.filter(active=True).values_list(
                  'registration_id',
                  flat=True
              ))
              if len(registration_ids) == 0:
                  return [{'failure': len(self), 'success': 0}]
  
              result = fcm_send_bulk_data_messages(
                  api_key=api_key,
                  registration_ids=registration_ids,
                  condition=condition,
                  collapse_key=collapse_key,
                  delay_while_idle=delay_while_idle,
                  time_to_live=time_to_live,
                  restricted_package_name=restricted_package_name,
                  low_priority=low_priority,
                  dry_run=dry_run,
                  data_message=data_message,
                  content_available=content_available,
                  timeout=timeout,
                  json_encoder=json_encoder,
              )
  
              self._deactivate_devices_with_error_results(
                  registration_ids,
                  result['results']
              )
  
              return result
docs: Send data messages for all active devices in queryset and deactivate if
          DELETE_INACTIVE_DEVICES setting is set to True.