code: def _is_union(typ):
      # noinspection PyBroadException
      try:
          rep = typ.__repr__().split(".")[1]
          if rep.startswith("Union"):
              return True
      except BaseException as error:
          print(f"Exception occurred: {error}")
      return False
  
file_path: ivy/ivy/utils/inspection.py
imports: from typing import get_type_hints
  import ivy
label_desc: Use image node_id 2 for calling a global function with example usage: _is_union(typ) and returns: False, True