class_docstr: MockPyEnvironment.
  
  Stores all actions taken in `actions_taken`. The returned values are:
  
  step: step_type, discount, reward, observation
  
  step: FIRST, 1., 0., [0]
  step: MID, 1., 0., [1]
  step: LAST, 0., 1. [2]
  ...repeated
class_docstr_tok: ["MockPyEnvironment",".","Stores","all","actions","taken","in","`","actions_taken","`",".","The","returned","values","are",":","step",":","step_type",",","discount",",","reward",",","observation","step",":","FIRST",",","1.",",","0.",",","[","0","]","step",":","MID",",","1.",",","0.",",","[","1","]","step",":","LAST",",","0.",",","1",".","[","2","]","...","repeated"]
code: def _step(self, action):
      self._state = (self._state + 1) % 3
      self.steps += 1
      self.last_call_thread_id = threading.current_thread().ident
      self.actions_taken.append(action)
  
      observation = [self._state]
      if self._state == 0:
          return ts.restart(
              observation
          )  # pytype: disable=wrong-arg-types
      elif self._state == 2:
          self.episodes += 1
          return ts.termination(
              observation, reward=1.0
          )  # pytype: disable=wrong-arg-types
      return ts.transition(observation, reward=0.0)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import threading
  from typing import Text
  from absl.testing import parameterized
  from absl.testing.absltest import mock
  import numpy
  import tensorflow
  from tf_agents import specs
  from tf_agents.environments import batched_py_environment
  from tf_agents.environments import py_environment
  from tf_agents.environments import suite_gym
  from tf_agents.environments import tf_py_environment
  from tf_agents.trajectories import time_step
  from tf_agents.utils import common
label_desc: Use image node_id 3 for calling the PYEnvironmentMock obj's underlying member method code with example usage: obj._step(action) and returns: ts, ts, ts