code: def __eq__(self, cmp) -> bool:
      assert isinstance(cmp, str)
      other = str(cmp)
      assert other in _get_field_names(
          self._cls
      ), f"{other} is not a valid tag for {self._cls}. Available tags: {_get_field_names(self._cls)}"
      return str(self) == other
  
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 2 for calling the _UnionTag obj's underlying member method code with example usage: obj.__eq__(cmp) and returns: unknown