class_docstr: Connects to the Tableau Server Instance and allows to communicate with it.
  
  Can be used as a context manager: automatically authenticates the connection
  when opened and signs out when closed.
  
  .. seealso:: https://tableau.github.io/server-client-python/docs/
  
  :param site_id: The id of the site where the workbook belongs to.
      It will connect to the default site if you don't provide an id.
  :param tableau_conn_id: The :ref:`Tableau Connection id <howto/connection:tableau>`
      containing the credentials to authenticate to the Tableau Server.
class_docstr_tok: ["Connects","to","the","Tableau","Server","Instance","and","allows","to","communicate","with","it",".","Can","be","used","as","a","context","manager",":","automatically","authenticates","the","connection","when","opened","and","signs","out","when","closed",".","..","seealso",":",":","https",":","\/\/tableau.github.io\/server-client-python\/docs\/",":","param","site_id",":","The","id","of","the","site","where","the","workbook","belongs","to",".","It","will","connect","to","the","default","site","if","you","do","n't","provide","an","id",".",":","param","tableau_conn_id",":","The",":","ref",":","`","Tableau","Connection","id","<","howto\/connection",":","tableau",">","`","containing","the","credentials","to","authenticate","to","the","Tableau","Server","."]
docstr: Sign in to the Tableau Server.
  
  :return: an authorized Tableau Server Context Manager object.
docstr_tok: ["Sign","in","to","the","Tableau","Server",".",":","return",":","an","authorized","Tableau","Server","Context","Manager","object","."]
code: def get_conn(self) -> Auth.contextmgr:
      """
      Sign in to the Tableau Server.
  
      :return: an authorized Tableau Server Context Manager object.
      """
      if self.conn.login and self.conn.password:
          return self._auth_via_password()
      if (
          "token_name" in self.conn.extra_dejson
          and "personal_access_token" in self.conn.extra_dejson
      ):
          return self._auth_via_token()
      raise NotImplementedError(
          "No Authentication method found for given Credentials!"
      )
  
imports: from __future__ import annotations
  import time
  import warnings
  from enum import Enum
  from typing import TYPE_CHECKING, Any
  from tableauserverclient import Pager, PersonalAccessTokenAuth, Server, TableauAuth
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 4 for calling the TableauHook obj's underlying member method code with example usage: obj.get_conn() and returns: self, self