code: def parse_boolean(val: str) -> str | bool:
      """Try to parse a string into boolean.
  
      The string is returned as-is if it does not look like a boolean value.
      """
      val = val.lower()
      if val in ("y", "yes", "t", "true", "on", "1"):
          return True
      if val in ("n", "no", "f", "false", "off", "0"):
          return False
      return val
  
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 1 for calling a global function with example usage: parse_boolean(val) and returns: val, True, False