code: def DetectRed(screen):
      red_count = (
          np.linalg.norm(
              screen.transpose([1, 2, 0]) - np.array([255, 0, 0]),
              axis=2,
          )
          < 128
      ).sum()
      all_count = screen.shape[1] * screen.shape[2]
      return float(red_count) / all_count > 0.01
  
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 a global function with example usage: DetectRed(screen) and returns: unknown