code: def __new__(cls, name, bases, ns, total=True):
      # Create new typed dict class object.
      # This method is called directly when TypedDict is subclassed,
      # or via _typeddict_new when TypedDict is instantiated. This way
      # TypedDict supports all three syntaxes described in its docstring.
      # Subclasses and instances of TypedDict return actual dictionaries
      # via _dict_new.
      ns["__new__"] = (
          _typeddict_new if name == "TypedDict" else _dict_new
      )
      tp_dict = super(_TypedDictMeta, cls).__new__(
          cls, name, (dict,), ns
      )
  
      anns = ns.get("__annotations__", {})
      msg = "TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type"
      anns = {n: _type_check(tp, msg) for n, tp in anns.items()}
      for base in bases:
          anns.update(base.__dict__.get("__annotations__", {}))
      tp_dict.__annotations__ = anns
      if not hasattr(tp_dict, "__total__"):
          tp_dict.__total__ = total
      return tp_dict
  
imports: from typing import Any
  import sys
  from typing import _type_check
label_desc: Use image node_id 1 for calling the _TypedDictMeta obj's underlying member method code with example usage: obj.__new__(cls, name, bases, ns, total) and returns: tp_dict