class_docstr: Sets and restores OpenAI gym registry.
class_docstr_tok: ["Sets","and","restores","OpenAI","gym","registry","."]
code: def collect_state(self):
      return gym.envs.registration.registry
  
imports: import multiprocessing
  from typing import Text
  import cloudpickle
  import gin
  import gym
  from tf_agents.system.default import multiprocessing_core
  from tf_agents.system.default.multiprocessing_core import *
label_desc: Use image node_id 1 for calling the OpenAIGymStateSaver obj's underlying member method code with example usage: obj.collect_state() and returns: gym