code: def create_class(
      connection,
      class_name,
      overriden_methods,
      getattr_overrides,
      setattr_overrides,
      class_methods,
  ):
      class_dict = {"__slots__": ()}
      for name, doc in class_methods.items():
          method_type = NORMAL_METHOD
          if name.startswith("___s___"):
              name = name[7:]
              method_type = STATIC_METHOD
          elif name.startswith("___c___"):
              name = name[7:]
              method_type = CLASS_METHOD
          if name in overriden_methods:
              if method_type == NORMAL_METHOD:
                  class_dict[name] = (
                      lambda override, orig_method: lambda obj, *args, **kwargs: override(
                          obj,
                          functools.partial(orig_method, obj),
                          *args,
                          **kwargs,
                      )
                  )(
                      overriden_methods[name],
                      _make_method(
                          method_type, connection, class_name, name, doc
                      ),
                  )
              elif method_type == STATIC_METHOD:
                  class_dict[name] = (
                      lambda override, orig_method: lambda *args, **kwargs: override(
                          orig_method, *args, **kwargs
                      )
                  )(
                      overriden_methods[name],
                      _make_method(
                          method_type, connection, class_name, name, doc
                      ),
                  )
              elif method_type == CLASS_METHOD:
                  class_dict[name] = (
                      lambda override, orig_method: lambda cls, *args, **kwargs: override(
                          cls,
                          functools.partial(orig_method, cls),
                          *args,
                          **kwargs,
                      )
                  )(
                      overriden_methods[name],
                      _make_method(
                          method_type, connection, class_name, name, doc
                      ),
                  )
          elif name not in LOCAL_ATTRS:
              class_dict[name] = _make_method(
                  method_type, connection, class_name, name, doc
              )
      # Check for any getattr/setattr overrides
      special_attributes = set(getattr_overrides.keys())
      special_attributes.update(set(setattr_overrides.keys()))
      overriden_attrs = set()
      for attr in special_attributes:
          getter = getattr_overrides.get(attr)
          setter = setattr_overrides.get(attr)
          if getter is not None:
              getter = lambda x, name=attr, inner=getter: inner(
                  x, name, lambda y=x, name=name: y.__getattr__(name)
              )
          if setter is not None:
              setter = lambda x, value, name=attr, inner=setter: inner(
                  x,
                  name,
                  lambda val, y=x, name=name: fwd_request(
                      y, OP_SETATTR, name, val
                  ),
                  value,
              )
              overriden_attrs.add(attr)
          class_dict[attr] = property(getter, setter)
      class_dict["___local_overrides___"] = overriden_attrs
      return MetaWithConnection(
          class_name, (Stub,), class_dict, connection
      )
  
imports: import functools
  import pickle
  from .consts import OP_GETATTR, OP_SETATTR, OP_DELATTR, OP_CALL, OP_CALLATTR, OP_CALLONCLASS, OP_DEL, OP_REPR, OP_STR, OP_HASH, OP_PICKLE, OP_DIR, OP_INIT
label_desc: Use image node_id 4 for calling a global function with example usage: create_class(connection, class_name, overriden_methods, getattr_overrides, setattr_overrides, class_methods) and returns: MetaWithConnection