'Get the Cython globals dict where the remote names are turned into
local strings.'

def get_cython_globals_dict(self):

    remote_dict = self.get_remote_cython_globals_dict()
    pyobject_dict = libpython.PyObjectPtr.from_pyobject_ptr(remote_dict)
    result = {}
    seen = set()
    for (k, v) in pyobject_dict.items():
        result[k.proxyval(seen)] = v
    return result
