class_docstr: Environment wrapper for OpenAI Gym environments.
class_docstr_tok: ["Environment","wrapper","for","OpenAI","Gym","environments","."]
code: def __init__(self, environment: gym.Env):
      self._environment = environment
      self._reset_next_step = True
      self._last_info = None
  
      # Convert action and observation specs.
      obs_space = self._environment.observation_space
      act_space = self._environment.action_space
      self._observation_spec = _convert_to_spec(
          obs_space, name="observation"
      )
      self._action_spec = _convert_to_spec(act_space, name="action")
  
imports: from typing import Any, Dict, List, Optional
  from acme import specs
  from acme import types
  import dm_env
  import gym
  from gym import spaces
  import numpy
  import tree
label_desc: Use image node_id 1 to create a new GymWrapper object from inherited base classes: dm_env with example: obj = GymWrapper(environment)