class_docstr: TaskSampler that samples from a finite pool of environments.
  
  This can be used with any environments, but is generally best when using
  in-process samplers with environments that are expensive to construct.
  
  Args:
      envs (list[Environment]): List of environments to use as a pool.
class_docstr_tok: ["TaskSampler","that","samples","from","a","finite","pool","of","environments",".","This","can","be","used","with","any","environments",",","but","is","generally","best","when","using","in-process","samplers","with","environments","that","are","expensive","to","construct",".","Args",":","envs","(","list","[","Environment","]",")",":","List","of","environments","to","use","as","a","pool","."]
docstr: Increase the size of the pool by copying random tasks in it.
  
  Note that this only copies the tasks already in the pool, and cannot
  create new original tasks in any way.
  
  Args:
      new_size (int): Size the pool should be after growning.
docstr_tok: ["Increase","the","size","of","the","pool","by","copying","random","tasks","in","it",".","Note","that","this","only","copies","the","tasks","already","in","the","pool",",","and","can","not","create","new","original","tasks","in","any","way",".","Args",":","new_size","(","int",")",":","Size","the","pool","should","be","after","growning","."]
code: def grow_pool(self, new_size):
      """Increase the size of the pool by copying random tasks in it.
  
      Note that this only copies the tasks already in the pool, and cannot
      create new original tasks in any way.
  
      Args:
          new_size (int): Size the pool should be after growning.
  
      """
      if new_size <= len(self._envs):
          return
      to_copy = _sample_indices(
          new_size - len(self._envs),
          len(self._envs),
          with_replacement=False,
      )
      for idx in to_copy:
          self._envs.append(copy.deepcopy(self._envs[idx]))
  
imports: import abc
  import copy
  import math
  import numpy
  from garage.envs import GymEnv, TaskNameWrapper, TaskOnehotWrapper
  from garage.sampler.env_update import ExistingEnvUpdate, NewEnvUpdate, SetTaskUpdate
label_desc: Use image node_id 4 for calling the EnvPoolSampler obj's underlying member method code with example usage: obj.grow_pool(new_size) without return types