class_docstr: An EnvProblem implemented as a batch of gym envs.
  
  This implementation should work well for cases where the env is not batched by
  default ex: any gym env. In this case we create `batch_size` number of envs
  and store them in a list. Any function then that interacts with the envs, like
  reset, step or close goes over the env list to do the needful, ex: when reset
  is called with specific indices we reset only those indices, etc.
  
  The usage of this class will look like the following:
  
  # 1. Creates and initializes the env_problem.
  ep = env_problem.EnvProblem(...)
  
  # 2. One needs to call reset() at the start, this resets all envs.
  ep.reset()
  
  # 3. Call step with actions for all envs, i.e. len(action) = batch_size
  obs, rewards, dones, infos = ep.step(actions)
  
  # 4. Figure out which envs got done and reset only those.
  ep.reset(indices=env_problem_utils.done_indices(dones))
  
  # 5. Go back to Step #3 to further interact with the env or just dump the
  # generated data to disk by calling:
  ep.generate_data(...)
  
  # 6. If we now need to use this object again to play a few more iterations
  # perhaps with a different batch size or maybe not recording the data, then
  # we need to re-initialize environments and do some book-keeping, call:
  ep.initialize_environments(batch_size)
  
  # 7. Go back to Step #2, i.e. reset all envs.
  
  NOTE: Look at `EnvProblemTest.test_interaction_with_env` and/or
  `EnvProblemTest.test_generate_data`
  
  NOTE: We rely heavily that the underlying environments expose a gym style
  interface, i.e. in addition to reset(), step() and close() we have access to
  the following properties: observation_space, action_space, reward_range.
class_docstr_tok: ["An","EnvProblem","implemented","as","a","batch","of","gym","envs",".","This","implementation","should","work","well","for","cases","where","the","env","is","not","batched","by","default","ex",":","any","gym","env",".","In","this","case","we","create","`","batch_size","`","number","of","envs","and","store","them","in","a","list",".","Any","function","then","that","interacts","with","the","envs",",","like","reset",",","step","or","close","goes","over","the","env","list","to","do","the","needful",",","ex",":","when","reset","is","called","with","specific","indices","we","reset","only","those","indices",",","etc",".","The","usage","of","this","class","will","look","like","the","following",":","#","1",".","Creates","and","initializes","the","env_problem",".","ep","=","env_problem.EnvProblem","(","...",")","#","2",".","One","needs","to","call","reset","(",")","at","the","start",",","this","resets","all","envs",".","ep.reset","(",")","#","3",".","Call","step","with","actions","for","all","envs",",","i.e",".","len","(","action",")","=","batch_size","obs",",","rewards",",","dones",",","infos","=","ep.step","(","actions",")","#","4",".","Figure","out","which","envs","got","done","and","reset","only","those",".","ep.reset","(","indices=env_problem_utils.done_indices","(","dones",")",")","#","5",".","Go","back","to","Step","#","3","to","further","interact","with","the","env","or","just","dump","the","#","generated","data","to","disk","by","calling",":","ep.generate_data","(","...",")","#","6",".","If","we","now","need","to","use","this","object","again","to","play","a","few","more","iterations","#","perhaps","with","a","different","batch","size","or","maybe","not","recording","the","data",",","then","#","we","need","to","re-initialize","environments","and","do","some","book-keeping",",","call",":","ep.initialize_environments","(","batch_size",")","#","7",".","Go","back","to","Step","#","2",",","i.e",".","reset","all","envs",".","NOTE",":","Look","at","`","EnvProblemTest.test_interaction_with_env","`","and\/or","`","EnvProblemTest.test_generate_data","`","NOTE",":","We","rely","heavily","that","the","underlying","environments","expose","a","gym","style","interface",",","i.e",".","in","addition","to","reset","(",")",",","step","(",")","and","close","(",")","we","have","access","to","the","following","properties",":","observation_space",",","action_space",",","reward_range","."]
code: def base_env_name(self):
      return self._base_env_name
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import multiprocessing.pool
  import time
  from absl import logging
  import gym
  import numpy
  from tensor2tensor.envs import env_problem
  from tensor2tensor.envs import trajectory
label_desc: Use image node_id 2 for calling the GymEnvProblem obj's underlying member method code with example usage: obj.base_env_name() and returns: self