class_docstr: Represents an incoming message.
  
  Includes the channel the responses should be sent to.
docstr: Creates a ``UserMessage`` object.
  
  Args:
      text: the message text content.
      output_channel: the output channel which should be used to send
          bot responses back to the user.
      sender_id: the message owner ID.
      parse_data: rasa data about the message.
      input_channel: the name of the channel which received this message.
      message_id: ID of the message.
      metadata: additional metadata for this message.
docstr_tok: ["Creates","a","``","UserMessage","``","object",".","Args",":","text",":","the","message","text","content",".","output_channel",":","the","output","channel","which","should","be","used","to","send","bot","responses","back","to","the","user",".","sender_id",":","the","message","owner","ID",".","parse_data",":","rasa","data","about","the","message",".","input_channel",":","the","name","of","the","channel","which","received","this","message",".","message_id",":","ID","of","the","message",".","metadata",":","additional","metadata","for","this","message","."]
code: def __init__(
      self,
      text: Optional[Text] = None,
      output_channel: Optional["OutputChannel"] = None,
      sender_id: Optional[Text] = None,
      parse_data: Optional[Dict[Text, Any]] = None,
      input_channel: Optional[Text] = None,
      message_id: Optional[Text] = None,
      metadata: Optional[Dict] = None,
      **kwargs: Any,
  ) -> None:
      """Creates a ``UserMessage`` object.
  
      Args:
          text: the message text content.
          output_channel: the output channel which should be used to send
              bot responses back to the user.
          sender_id: the message owner ID.
          parse_data: rasa data about the message.
          input_channel: the name of the channel which received this message.
          message_id: ID of the message.
          metadata: additional metadata for this message.
  
      """
      self.text = text.strip() if text else text
  
      if message_id is not None:
          self.message_id = str(message_id)
      else:
          self.message_id = uuid.uuid4().hex
  
      if output_channel is not None:
          self.output_channel = output_channel
      else:
          self.output_channel = CollectingOutputChannel()
  
      if sender_id is not None:
          self.sender_id = str(sender_id)
      else:
          self.sender_id = DEFAULT_SENDER_ID
  
      self.input_channel = input_channel
  
      self.parse_data = parse_data
      self.metadata = metadata
      self.headers = kwargs.get("headers", None)
  
imports: import json
  import logging
  import uuid
  import jwt
  from sanic import Sanic, Blueprint
  from sanic.request import Request
  from typing import Text, List, Dict, Any, Optional, Callable, Iterable, Awaitable, NoReturn
  from rasa.cli import utils
  from rasa.shared.constants import DOCS_BASE_URL, DEFAULT_SENDER_ID
  from rasa.core.constants import BEARER_TOKEN_PREFIX
  from rasa.shared.exceptions import RasaException
label_desc: Use image node_id 1 to create a new UserMessage object  with example: obj = UserMessage(text, output_channel, sender_id, parse_data, input_channel, message_id, metadata)