class_docstr: Channel that uses Google Hangouts Chat API to communicate.
class_docstr_tok: ["Channel","that","uses","Google","Hangouts","Chat","API","to","communicate","."]
code: def __init__(
      self,
      project_id: Optional[Text] = None,
      hangouts_user_added_intent_name: Optional[Text] = "/user_added",
      hangouts_room_added_intent_name: Optional[Text] = "/room_added",
      hangouts_removed_intent_name: Optional[Text] = "/bot_removed",
  ) -> None:
      self.project_id = project_id
      self.hangouts_user_added_intent_name = (
          hangouts_user_added_intent_name
      )
      self.hangouts_room_added_intent_name = (
          hangouts_room_added_intent_name
      )
      self.hangouts_user_added_intent_name = (
          hangouts_removed_intent_name
      )
  
      # Google's Request obj (this is used to make HTTP requests) uses cached
      # session to fetch Google's service certs. Certs don't change frequently,
      # so it makes sense to cache request body, rather than getting it again
      # every message. Actual caching depends on response headers.
      # see: https://github.com/googleapis/google-auth-library-python/blob/main/google/oauth2/id_token.py#L15 # noqa: E501
      cached_session = cachecontrol.CacheControl(requests.session())
      self.google_request = google.auth.transport.requests.Request(
          session=cached_session
      )
  
imports: import copy
  import logging
  import structlog
  import google.auth.transport.requests
  import cachecontrol
  import requests
  from asyncio import CancelledError
  from sanic import Blueprint, response
  from sanic.request import Request
  from typing import Text, List, Dict, Any, Optional, Callable, Iterable, Awaitable, Union
  from google.oauth2 import id_token
  from sanic.response import HTTPResponse
  from sanic.exceptions import SanicException
  from rasa.core.channels.channel import InputChannel, OutputChannel, UserMessage
label_desc: Use image node_id 2 to create a new HangoutsInput object from inherited base classes: InputChannel with example: obj = HangoutsInput(project_id, hangouts_user_added_intent_name, hangouts_room_added_intent_name, hangouts_removed_intent_name)