class_docstr: WebexTeams input channel. Based on the HTTPInputChannel.
class_docstr_tok: ["WebexTeams","input","channel",".","Based","on","the","HTTPInputChannel","."]
code: def blueprint(
      self, on_new_message: Callable[[UserMessage], Awaitable[Any]]
  ) -> Blueprint:
      webexteams_webhook = Blueprint("webexteams_webhook", __name__)
  
      @webexteams_webhook.route("/", methods=["GET"])
      async def health(_: Request) -> HTTPResponse:
          return response.json({"status": "ok"})
  
      @webexteams_webhook.route("/webhook", methods=["POST"])
      async def webhook(request: Request) -> HTTPResponse:
          """Respond to inbound webhook HTTP POST from Webex Teams."""
          logger.debug("Received webex webhook call")
          # Get the POST data sent from Webex Teams
          json_data = request.json
  
          # Create a Webhook object from the JSON data
          webhook_obj = Webhook(json_data)
          # Get the message details
          message = self.api.messages.get(webhook_obj.data.id)
  
          # This is a VERY IMPORTANT loop prevention control step.
          # If you respond to all messages...  You will respond to the
          # messages that the bot posts and thereby create a loop
          me = self.api.people.me()
          if message.personId == me.id:
              # Message was sent by me (bot); do not respond.
              return response.text("OK")
  
          else:
              metadata = self.get_metadata(request)
              await self.process_message(
                  on_new_message, message.text, message.roomId, metadata
              )
              return response.text("")
  
      return webexteams_webhook
  
file_path: rasa/rasa/core/channels/webexteams.py
imports: import logging
  from sanic import Blueprint, response
  from sanic.request import Request
  from typing import Text, Optional, Dict, Any, Callable, Awaitable
  from sanic.response import HTTPResponse
  from webexteamssdk import WebexTeamsAPI, Webhook
  from rasa.core.channels.channel import InputChannel
  from rasa.core.channels.channel import UserMessage, OutputChannel
label_desc: Use image node_id 4 for calling the WebexTeamsInput obj's underlying member method code with example usage: obj.blueprint(on_new_message) and returns: webexteams_webhook, response, response, response