code: def EMetaclass(cls):
      
      superclass = cls.__bases__
      if not issubclass(cls, EObject):
          sclasslist = list(superclass)
          if object in superclass:
              index = sclasslist.index(object)
              sclasslist.insert(index, EObject)
              sclasslist.remove(object)
          else:
              sclasslist.insert(0, EObject)
          superclass = tuple(sclasslist)
      orig_vars = cls.__dict__.copy()
      slots = orig_vars.get('__slots__')
      if slots is not None:
          if isinstance(slots, str):
              slots = [slots]
          for slots_var in slots:
              orig_vars.pop(slots_var)
      orig_vars.pop('__dict__', None)
      orig_vars.pop('__weakref__', None)
      return MetaEClass(cls.__name__, superclass, orig_vars)
docs: Class decorator for creating PyEcore metaclass.