code: def _get_from_c_api():
      
      from ctypes import pythonapi, py_object
  
      PyDictProxy_New = pythonapi.PyDictProxy_New
      PyDictProxy_New.argtypes = (py_object,)
      PyDictProxy_New.restype = py_object
  
      # To actually create new dictproxy instances, we need a class that calls
      # the above C API functions, but a subclass would also bring with it some
      # indirection baggage.  Let's skip all that and have the subclass's __new__
      # return an object of the real dictproxy type.
      # In other words, the `dictproxy` class being created here is never
      # instantiated and never does anything.  It's a glorified function.
      # (That's why it just inherits from `object`, too.)
      class dictproxy(object):
          """Read-only proxy for a dict, using the same mechanism Python uses for
          the __dict__ attribute on objects.
  
          Create with dictproxy(some_dict).  The original dict is still
          read/write, and changes to the original dict are reflected in real time
          via the proxy, but the proxy cannot be edited in any way.
          """
  
          def __new__(cls, d):
              if not isinstance(d, dict):
                  # I suspect bad things would happen if this were not true.
                  raise TypeError("dictproxy can only proxy to a real dict")
  
              return PyDictProxy_New(d)
  
      # Try this once to make sure it actually works.  Because PyPy has all the
      # parts and then crashes when trying to actually use them.
      # See also: https://bugs.pypy.org/issue1233
      dictproxy(dict())
  
      # And slap on a metaclass that fools isinstance() while we're at it.
      return _add_isinstance_tomfoolery(dictproxy)
docs: dictproxy does exist in previous versions, but the Python constructor
      refuses to create new objects, so we must be underhanded and sneaky with
      ctypes.