class_docstr: Exposes a Python environment as an in-graph TF environment.
  
  This class supports Python environments that return nests of arrays as
  observations and accept nests of arrays as actions. The nest structure is
  reflected in the in-graph environment's observation and action structure.
  
  Implementation notes:
  
  * Since `tf.py_func` deals in lists of tensors, this class has some additional
    `tf.nest.flatten` and `tf.nest.pack_structure_as` calls.
  
  * This class currently cast rewards and discount to float32.
class_docstr_tok: ["Exposes","a","Python","environment","as","an","in-graph","TF","environment",".","This","class","supports","Python","environments","that","return","nests","of","arrays","as","observations","and","accept","nests","of","arrays","as","actions",".","The","nest","structure","is","reflected","in","the","in-graph","environment","'s","observation","and","action","structure",".","Implementation","notes",":","*","Since","`","tf.py_func","`","deals","in","lists","of","tensors",",","this","class","has","some","additional","`","tf.nest.flatten","`","and","`","tf.nest.pack_structure_as","`","calls",".","*","This","class","currently","cast","rewards","and","discount","to","float32","."]
docstr: Returns the current ts.TimeStep.
  
  Returns:
    A `TimeStep` tuple of:
      step_type: A scalar int32 tensor representing the `StepType` value.
      reward: A float32 tensor representing the reward at this
        timestep.
      discount: A scalar float32 tensor representing the discount [0, 1].
      observation: A Tensor, or a nested dict, list or tuple of Tensors
        corresponding to `observation_spec()`.
docstr_tok: ["Returns","the","current","ts.TimeStep",".","Returns",":","A","`","TimeStep","`","tuple","of",":","step_type",":","A","scalar","int32","tensor","representing","the","`","StepType","`","value",".","reward",":","A","float32","tensor","representing","the","reward","at","this","timestep",".","discount",":","A","scalar","float32","tensor","representing","the","discount","[","0",",","1","]",".","observation",":","A","Tensor",",","or","a","nested","dict",",","list","or","tuple","of","Tensors","corresponding","to","`","observation_spec","(",")","`","."]
code: def _current_time_step(self):
      """Returns the current ts.TimeStep.
  
      Returns:
        A `TimeStep` tuple of:
          step_type: A scalar int32 tensor representing the `StepType` value.
          reward: A float32 tensor representing the reward at this
            timestep.
          discount: A scalar float32 tensor representing the discount [0, 1].
          observation: A Tensor, or a nested dict, list or tuple of Tensors
            corresponding to `observation_spec()`.
      """
  
      def _current_time_step_py():
          with _check_not_called_concurrently(self._lock):
              if self._time_step is None:
                  self._time_step = self._env.reset()
              return tf.nest.flatten(self._time_step)
  
      def _isolated_current_time_step_py():
          return self._execute(_current_time_step_py)
  
      with tf.name_scope("current_time_step"):
          outputs = tf.numpy_function(
              _isolated_current_time_step_py,
              [],  # No inputs.
              self._time_step_dtypes,
              name="current_time_step_py_func",
          )
          return self._time_step_from_numpy_function_outputs(outputs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import contextlib
  from multiprocessing import pool
  import threading
  from typing import Any, Optional, Text
  from absl import logging
  import gin
  import numpy
  import tensorflow
  from tf_agents.environments import batched_py_environment
  from tf_agents.environments import py_environment
  from tf_agents.environments import tf_environment
  from tf_agents.specs import tensor_spec
  from tf_agents.typing import types
  from tensorflow.python.framework import tensor_shape
label_desc: Use image node_id 6 for calling the TFPyEnvironment obj's underlying member method code with example usage: obj._current_time_step() and returns: self, self, tf