code: def type(self) -> str:
      try:
          return self._type
      except AttributeError as e:
          raise RuntimeError(
              f"Please use {type(self).__name__}.create to instantiate the union type."
          ) from e
  
file_path: pytorch/torch/_export/serde/union.py
imports: import functools
  from dataclasses import fields
  from typing import Hashable, Set
label_desc: Use image node_id 3 for calling the _Union obj's underlying member method code with example usage: obj.type() and returns: self