code: def rgb2gray(img: np.ndarray) -> np.ndarray:
      if cv2:
          return cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
      return color.rgb2gray(img)
  
imports: import logging
  import numpy
  from ray.rllib.utils.annotations import DeveloperAPI
label_desc: Use image node_id 2 for calling a global function with example usage: rgb2gray(img) and returns: color, cv2