code: def maybe_unwrap_optional(type_hint: Any) -> tuple[bool, Any]:
      origin = typing.get_origin(type_hint)
      args = typing.get_args(type_hint)
      if (
          origin
          and origin in _UNION_ORIGINS
          and args
          and type(None) in args
      ):
          args_except_none = [t for t in args if t != type(None)]
          if len(args_except_none) == 1:
              return True, args_except_none[0]
      return False, type_hint
  
file_path: tfx/tfx/utils/pure_typing_utils.py
imports: import collections.abc
  import inspect
  import sys
  import types
  import typing
  from typing import Any, Iterable, Literal, Mapping, Type, TypeVar, TypedDict
  from typing_extensions import Annotated, NotRequired, Required, TypeGuard
  from google.protobuf.internal import enum_type_wrapper
label_desc: Use image node_id 5 for calling a global function with example usage: maybe_unwrap_optional(type_hint) and returns: False,  type_hint, True,  args_except_none