docs: def _make_subclasshook(cls):
      """Construct a __subclasshook__ callable that incorporates
      the associated __extra__ class in subclass checks performed
      against cls.
      """
      if isinstance(cls.__extra__, abc.ABCMeta):
          # The logic mirrors that of ABCMeta.__subclasscheck__.
          # Registered classes need not be checked here because
          # cls and its extra share the same _abc_registry.
          def __extrahook__(cls, subclass):
              res = cls.__extra__.__subclasshook__(subclass)
              if res is not NotImplemented:
                  return res
              if cls.__extra__ in getattr(subclass, '__mro__', ()):
                  return True
              for scls in cls.__extra__.__subclasses__():
                  # If we have fake typing and typing detect by module name
                  if scls.__class__.__module__ == "typing":
                      continue
                  if isinstance(scls, GenericMeta):
                      continue
                  if issubclass(subclass, scls):
                      return True
              return NotImplemented
      else:
          # For non-ABC extras we'll just call issubclass().
          def __extrahook__(cls, subclass):
              if cls.__extra__ and issubclass(subclass, cls.__extra__):
                  return True
              return NotImplemented
      return classmethod(__extrahook__)