code: def test_pickup_raycast(self):
      env = deepmind_lab.Lab(
          "tests/in_fov_test",
          ["FOVTESTS", "ENTITYVIS", "DEBUG.POS.TRANS"],
          config={"fps": "60", "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)
  
      action[action_index["MOVE_BACK_FORWARD"]] = 1
  
      reward = env.reset()
  
      fov_tests = env.observations()["FOVTESTS"]
      self.assertEqual(fov_tests[0], 1)
      self.assertEqual(fov_tests[1], 1)
      self.assertEqual(fov_tests[2], 0)
      entity_vis = env.observations()["ENTITYVIS"]
      self.assertEqual(entity_vis[0], 1)
      self.assertLess(entity_vis[1], 1)
      self.assertEqual(entity_vis[2], -1)
  
      for _ in six.moves.range(120):
          reward = env.step(action, 1)
          if reward > 0:
              self.assertEqual(reward, 1)
              break
      else:
          print(env.observations()["DEBUG.POS.TRANS"])
          self.fail("Failed to pickup 1st apple!")
  
      fov_tests = env.observations()["FOVTESTS"]
      self.assertEqual(fov_tests[0], 1)
      self.assertEqual(fov_tests[1], 0)
      self.assertEqual(fov_tests[2], 0)
      entity_vis = env.observations()["ENTITYVIS"]
      self.assertEqual(entity_vis[0], 1)
      self.assertEqual(entity_vis[1], -1)
      self.assertEqual(entity_vis[2], -1)
  
      action[action_index["STRAFE_LEFT_RIGHT"]] = 1
      action[action_index["MOVE_BACK_FORWARD"]] = 0
  
      for _ in six.moves.range(160):
          reward = env.step(action, 1)
          if reward > 0:
              self.assertEqual(reward, 1)
              break
      else:
          print(env.observations()["DEBUG.POS.TRANS"])
          self.fail("Failed to pickup 2st apple!")
  
      fov_tests = env.observations()["FOVTESTS"]
      self.assertEqual(fov_tests[0], 0)
      self.assertEqual(fov_tests[1], 0)
      self.assertEqual(fov_tests[2], 0)
      entity_vis = env.observations()["ENTITYVIS"]
      self.assertEqual(entity_vis[0], -1)
      self.assertEqual(entity_vis[1], -1)
      self.assertEqual(entity_vis[2], -1)
  
      action[action_index["STRAFE_LEFT_RIGHT"]] = 0
      action[action_index["MOVE_BACK_FORWARD"]] = -1
  
      for _ in six.moves.range(160):
          reward = env.step(action, 1)
          if reward > 0:
              self.assertEqual(reward, 1)
              break
      else:
          print(env.observations()["DEBUG.POS.TRANS"])
          self.fail("Failed to pickup 3rd apple!")
  
      fov_tests = env.observations()["FOVTESTS"]
      self.assertEqual(fov_tests[0], 1)
      self.assertEqual(fov_tests[1], 1)
      self.assertEqual(fov_tests[2], 0)
  
file_path: lab/python/tests/in_fov_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 InFovTest obj's underlying member method code with example usage: obj.test_pickup_raycast() without return types