PyFunctionObject.func_globals

A dictionary (other mappings won't do)

struct PyFunctionObject
PyObject* func_globals;

Meta