code: def test_self_orb(self):
      env = deepmind_lab.Lab(
          "tests/spawn_inventory_test",
          ["DEBUG.POS.ROT"],
          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["LOOK_DOWN_UP_PIXELS_PER_FRAME"]] = 100
  
      reward = env.reset()
      for _ in six.moves.range(60):
          env.step(action, 1)
          if env.observations()["DEBUG.POS.ROT"][0] > 85:
              break
      else:
          self.fail("Failed to look at floor!")
  
      action[action_index["LOOK_DOWN_UP_PIXELS_PER_FRAME"]] = 0
      action[action_index["FIRE"]] = 1
  
      for _ in six.moves.range(600):
          reward = env.step(action, 1)
          if reward < 0:
              self.assertEqual(reward, -1)
              break
      else:
          self.fail("Failed to orb floor!")
  
file_path: lab/python/tests/spawn_inventory_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 ScoreEventTest obj's underlying member method code with example usage: obj.test_self_orb() without return types