class_docstr: Batch together multiple py environments and act as a single batch.
  
  The environments should only access shared python variables using
  shared mutex locks (from the threading module).
class_docstr_tok: ["Batch","together","multiple","py","environments","and","act","as","a","single","batch",".","The","environments","should","only","access","shared","python","variables","using","shared","mutex","locks","(","from","the","threading","module",")","."]
docstr: Send close messages to the external process and join them.
docstr_tok: ["Send","close","messages","to","the","external","process","and","join","them","."]
code: def close(self) -> None:
      """Send close messages to the external process and join them."""
      self._execute(lambda env: env.close(), self._envs)
      if self._parallel_execution:
          self._pool.close()
          self._pool.join()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from multiprocessing import dummy
  from multiprocessing import pool
  from typing import Sequence, Optional
  import gin
  import tensorflow
  from tf_agents.environments import py_environment
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 13 for calling the BatchedPyEnvironment obj's underlying member method code with example usage: obj.close() without return types