code: def _color_to_grayscale(obs):
      """Convert a 3-channel color observation image to grayscale and uint8.
  
      Args:
         obs (np.ndarray): Observation array, conforming to observation_space
  
      Returns:
         np.ndarray: 1-channel grayscale version of obs, represented as uint8
  
      """
      with warnings.catch_warnings():
          # Suppressing warning for possible precision loss when converting
          # from float64 to uint8
          warnings.simplefilter("ignore")
          return img_as_ubyte(color.rgb2gray((obs)))
  
file_path: garage/src/garage/envs/wrappers/grayscale.py
imports: import warnings
  import gym
  import gym.spaces
  import numpy
  from skimage import color, img_as_ubyte
label_desc: Use image node_id 1 for calling a global function with example usage: _color_to_grayscale(obs) and returns: img_as_ubyte