def _step_adversary_py(*flattened_actions):
     with tf_py_environment._check_not_called_concurrently(self._lock):  # pylint:disable=protected-access
         packed = tf.nest.pack_sequence_as(
             structure=self.adversary_action_spec,
             flat_sequence=flattened_actions)
         self._time_step = self._env.step_adversary(packed)
         return tf.nest.flatten(self._time_step)
 def _current_random_time_step_py():
     with tf_py_environment._check_not_called_concurrently(self._lock):  # pylint:disable=protected-access
         if self._time_step is None:
             self._time_step = self._env.reset_random()
         return tf.nest.flatten(self._time_step)
 def _reset_py():
     with tf_py_environment._check_not_called_concurrently(self._lock):  # pylint:disable=protected-access
         self._time_step = self._env.reset_random()