code: def _gorg(cls):
      
      assert isinstance(cls, GenericMeta)
      if hasattr(cls, '_gorg'):
          return cls._gorg
      while cls.__origin__ is not None:
          cls = cls.__origin__
      return cls
docs: This function exists for compatibility with old typing versions.