I asked this question elsewhere but it seems to be too advanced for the audience. Basically, can generator frames have parent? What would be the construct?
assert inspect.isgenerator(some_generator)
assert some_generator.gi_frame.f_back is not None # is this assertion ever possible?
# if yes, what would be the python code for some_generator?