code: def test_movement(self):
      fps = 60
      env = deepmind_lab.Lab(
          "tests/teleporter_test",
          [
              "VEL.TRANS",
              "DEBUG.POS.TRANS",
              "DEBUG.POS.ROT",
          ],
          config={
              "fps": str(fps),
              "width": "80",
              "height": "80",
          },
      )
  
      action_spec = env.action_spec()
      action_index = {
          action["name"]: i for i, action in enumerate(action_spec)
      }
  
      action = np.zeros([len(action_spec)], dtype=np.intc)
  
      env.reset()
      vel = env.observations()["VEL.TRANS"]
      self.assertTrue(np.array_equal(vel, np.array([0, 0, 0])))
  
      # Agent begins facing south
      initial_facing = env.observations()["DEBUG.POS.ROT"]
      self.assertTrue(
          np.allclose(initial_facing, np.array([0, -90, 0]), atol=0.1)
      )
  
      # Player moves straight ahead through the teleporter
      action[action_index["MOVE_BACK_FORWARD"]] = 1
      self.assertEqual(env.events(), [])
      for _ in six.moves.range(120):
          p_before = env.observations()["DEBUG.POS.TRANS"]
          env.step(action, 1)
          p_after = env.observations()["DEBUG.POS.TRANS"]
          if p_after[1] - p_before[1] > 100:
              break
      else:
          self.fail("Failed to teleport")
      self.assertEqual(env.events(), [("PLAYER_TELEPORTED", [])])
      env.step(action, 1)
      self.assertEqual(env.events(), [])
  
file_path: lab/python/tests/teleporter_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl.testing import absltest
  import numpy
  import six
  import deepmind_lab
label_desc: Use image node_id 1 for calling the TeleporterTest obj's underlying member method code with example usage: obj.test_movement() without return types