def get_function_closures(fn): return (*( closure.cell_contents for closure in fn.__closure__ ),)
Related: