Get the mapping of generator local variables to their current values. A dict is returned, with the keys the local variable names and values the bound values.
The official docs include a CPython implementation detail for this entry.
inspect/getgeneratorlocals
getgeneratorlocals