Return a list of objects tracked by the collector (excluding the list returned). generation Generation to extract the objects from. If generation is not None, return only the objects tracked by the collector that are in that generation.
gc/get_objects
get_objects