code: def test_LookRender(self):
      env = deepmind_lab.Lab(
          "tests/custom_view",
          ["RGB", "RGB.LOOK_FORWARD", "RGB.LOOK_BACK"],
          config={
              "fps": "60",
              "width": "64",
              "height": "64",
              "debugCamera": "false",
              "maxAltCameraWidth": "128",
              "maxAltCameraHeight": "128",
          },
      )
  
      env.reset()
      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.step(action)
  
      player = env.observations()["RGB"]
      forward = env.observations()["RGB.LOOK_FORWARD"]
      back = env.observations()["RGB.LOOK_BACK"]
  
      self.assertEqual(player.shape, (3, 64, 64))
      self.assertEqual(forward.shape, (3, 128, 128))
      self.assertEqual(back.shape, (3, 128, 128))
  
      self.assertTrue(DetectRed(player))
      self.assertTrue(DetectRed(forward))
      self.assertFalse(DetectRed(back))
  
      current_angle = [0, 0]
      target_angle = [180, 0]
      look_speed = math_utils.calculate_speed(
          60, current_angle, target_angle, 8
      )
      action[
          action_index["LOOK_LEFT_RIGHT_PIXELS_PER_FRAME"]
      ] = look_speed[0]
      env.step(action, 8)  # Turn 180 degrees.
  
      player = env.observations()["RGB"]
      forward = env.observations()["RGB.LOOK_FORWARD"]
      back = env.observations()["RGB.LOOK_BACK"]
  
      self.assertFalse(DetectRed(player))
      self.assertFalse(DetectRed(forward))
      self.assertTrue(DetectRed(back))
  
file_path: lab/python/tests/custom_view_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 deepmind_lab
  from python.tests.utils import math_utils
label_desc: Use image node_id 1 for calling the CustomViewTest obj's underlying member method code with example usage: obj.test_LookRender() without return types