code: def set_actor(user, sender, instance, signal_duid, **kwargs):
          
          if hasattr(threadlocal, 'auditlog'):
              if signal_duid != threadlocal.auditlog['signal_duid']:
                  return
              try:
                  app_label, model_name = settings.AUTH_USER_MODEL.split('.')
                  auth_user_model = apps.get_model(app_label, model_name)
              except ValueError:
                  auth_user_model = apps.get_model('auth', 'user')
              if sender == LogEntry and isinstance(user, auth_user_model) and instance.actor is None:
                  instance.actor = user
  
              instance.remote_addr = threadlocal.auditlog['remote_addr']
docs: Signal receiver with an extra, required 'user' kwarg. This method becomes a real (valid) signal receiver when
          it is curried with the actor.