code: def new_class(name, bases=(), kwds=None, exec_body=None):
      """Create a class object dynamically using the appropriate metaclass."""
      resolved_bases = resolve_bases(bases)
      meta, ns, kwds = prepare_class(name, resolved_bases, kwds)
      if exec_body is not None:
          exec_body(ns)
      if resolved_bases is not bases:
          ns["__orig_bases__"] = bases
      return meta(name, resolved_bases, ns, **kwds)
  
imports: import sys
label_desc: Use image node_id 4 for calling a global function with example usage: new_class(name, bases, kwds, exec_body) and returns: meta