code: def on_before_publish_insert_request_id_header(headers, **kwargs):
      
      if _CELERY_X_HEADER not in headers:
          request_id = current_request_id()
          headers[_CELERY_X_HEADER] = request_id
          logger.debug("Forwarding request_id '{}' to the task consumer.".format(request_id))
docs: This function is meant to be used as signal processor for "before_task_publish".
      :param Dict headers: The headers of the message
      :param kwargs: Any extra keyword arguments