class_docstr: Sets and restores OpenAI gym registry.
class_docstr_tok: ["Sets","and","restores","OpenAI","gym","registry","."]
code: def restore_state(self, state):
      if not isinstance(state, gym.envs.registration.EnvRegistry):
          raise RuntimeError(
              "Expected gym registry object of type {}, but saw state {}".format(
                  gym.envs.registration.EnvRegistry, state
              )
          )
      gym.envs.registration.registry = state
  
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 2 for calling the OpenAIGymStateSaver obj's underlying member method code with example usage: obj.restore_state(state) without return types