code: def with_metaclass(meta, *bases):
      # type: (Type[Any], Tuple[Type[Any], ...]) -> Any
      """
      Create a base class with a metaclass.
      """
  
      # This requires a bit of explanation: the basic idea is to make a dummy
      # metaclass for one level of class instantiation that replaces itself with
      # the actual metaclass.
      class metaclass(meta):  # type: ignore
          def __new__(cls, name, this_bases, d):
              # type: (Type[Any], str, Tuple[Any], Dict[Any, Any]) -> Any
              return meta(name, bases, d)
  
      return type.__new__(metaclass, "temporary_class", (), {})
  
imports: from __future__ import absolute_import, division, print_function
  import sys
  from ._typing import TYPE_CHECKING
label_desc: Use image node_id 1 for calling a global function with example usage: with_metaclass(meta) and returns: type, meta