docs: def create_log_action(self, **kwargs):
          """
          Helper method to create a new log entry.
          This method automatically populates some fields when no explicit value is given.
          :param instance: The model instance to log a change for.
          :type instance: Model
          :param kwargs: Field overrides for the :py:class:`LogAction` object.
          :return: The new log entry or `None` if there were no changes.
          :rtype: LogAction
          """
          instance = kwargs.get('instance', None)
          if instance is not None:
              del kwargs['instance']
  
          request = kwargs.get('request', None)
          if request is not None:
              del kwargs['request']
              # Let's grab the current IP of the user.
              x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')
              if x_forwarded_for:
                  remote_ip = x_forwarded_for.split(',')[0]
              else:
                  remote_ip = request.META.get('REMOTE_ADDR')
              kwargs.setdefault('remote_ip', remote_ip)
  
          if instance is not None:
              pk = self._get_pk_value(instance)
  
              kwargs.setdefault(
                  'content_type',
                  ContentType.objects.get_for_model(instance)
              )
              kwargs.setdefault('object_pk', pk)
              kwargs.setdefault('object_repr', smart_text(instance))
  
              if isinstance(pk, integer_types):
                  kwargs.setdefault('object_id', pk)
  
              get_object_extra_info = getattr(
                  instance,
                  'get_object_extra_info',
                  None
              )
  
              if callable(get_object_extra_info):
                  kwargs.setdefault('object_extra_info', get_object_extra_info())
  
              # Delete log entries with the same pk as a newly created model.
              # This should only be necessary when an pk is used twice.
              if kwargs.get('action', None) is app_conf.CREATE:
                  is_obj_exists = self.filter(
                      content_type=kwargs.get('content_type'),
                      object_id=kwargs.get('object_id')
                  ).exists()
  
                  if kwargs.get('object_id', None) is not None and is_obj_exists:
                      self.filter(
                          content_type=kwargs.get('content_type'),
                          object_id=kwargs.get('object_id')
                      ).delete()
                  else:
                      self.filter(
                          content_type=kwargs.get('content_type'),
                          object_pk=kwargs.get('object_pk', '')
                      ).delete()
  
          action_log = self.create(**kwargs)
          action_logged.send(sender=LogAction, action=action_log)
          return action_log