code: def test_step_illegal_move(self):
      self.env.set_state(
          TimeStep(
              StepType.MID,
              TicTacToeEnvironment.REWARD_DRAW_OR_NOT_FINAL,
              self.discount,
              np.array([[2, 2, 0], [0, 1, 1], [0, 0, 0]]),
          )
      )
  
      current_time_step = self.env.current_time_step()
      self.assertEqual(StepType.MID, current_time_step.step_type)
  
      # Taking an illegal move.
      ts = self.env.step(np.array([0, 0]))
  
      np.testing.assert_array_equal(
          [[2, 2, 0], [0, 1, 1], [0, 0, 0]], ts.observation
      )
      self.assertEqual(StepType.LAST, ts.step_type)
      self.assertEqual(
          TicTacToeEnvironment.REWARD_ILLEGAL_MOVE, ts.reward
      )
  
      # Reset if an action is taken after final state is reached.
      ts = self.env.step(np.array([2, 0]))
      self.assertEqual(StepType.FIRST, ts.step_type)
      self.assertEqual(0.0, ts.reward)
  
file_path: agents/tf_agents/environments/examples/tic_tac_toe_environment_test.py
imports: import numpy
  from tf_agents.environments import utils
  from tf_agents.environments.examples.tic_tac_toe_environment import TicTacToeEnvironment
  from tf_agents.trajectories.time_step import StepType
  from tf_agents.trajectories.time_step import TimeStep
  from tf_agents.utils import test_utils
label_desc: Use image node_id 9 for calling the TicTacToeEnvironmentTest obj's underlying member method code with example usage: obj.test_step_illegal_move() without return types