code: def __new__(cls, name, bases, dct):
      props = dct.get("__props__", None)
      if props is not None:
          if not isinstance(props, tuple):
              raise TypeError("__props__ has to be a tuple")
          if not all(isinstance(p, str) for p in props):
              raise TypeError(
                  "elements of __props__ have to be strings"
              )
  
          def _props(self):
              """
              Tuple of properties of all attributes
              """
              return tuple(getattr(self, a) for a in props)
  
          dct["_props"] = _props
  
          def _props_dict(self):
              """This return a dict of all ``__props__`` key-> value.
  
              This is useful in optimization to swap op that should have the
              same props. This help detect error that the new op have at
              least all the original props.
  
              """
              return {a: getattr(self, a) for a in props}
  
          dct["_props_dict"] = _props_dict
  
          if "__hash__" not in dct:
  
              def __hash__(self):
                  return hash(
                      (
                          type(self),
                          tuple(getattr(self, a) for a in props),
                      )
                  )
  
              dct["__hash__"] = __hash__
  
          if "__eq__" not in dct:
  
              def __eq__(self, other):
                  return type(self) == type(other) and tuple(
                      getattr(self, a) for a in props
                  ) == tuple(getattr(other, a) for a in props)
  
              dct["__eq__"] = __eq__
  
          # FIXME: This overrides __str__ inheritance when props are provided
          if "__str__" not in dct:
              if len(props) == 0:
  
                  def __str__(self):
                      return f"{self.__class__.__name__}"
  
              else:
  
                  def __str__(self):
                      return "{}{{{}}}".format(
                          self.__class__.__name__,
                          ", ".join(
                              f"{p}={getattr(self, p)!r}" for p in props
                          ),
                      )
  
              dct["__str__"] = __str__
  
      return super().__new__(cls, name, bases, dct)
  
imports: import linecache
  import sys
  import traceback
  from abc import ABCMeta
  from collections.abc import Sequence
  from io import StringIO
  from typing import TYPE_CHECKING, Any, Optional, TypeVar, Union
label_desc: Use image node_id 1 for calling the MetaType obj's underlying member method code with example usage: obj.__new__(cls, name, bases, dct) and returns: super, tuple, unknown, hash, unknown, self, str