class_docstr: Converts a color image observation specified using the RGB encoding into a grayscale
  image observation, by keeping only the luminance (Y) channel of the YUV encoding. This can be useful if the colors
  in the original image are not relevant for solving the task at hand.
  The channels axis is assumed to be the last axis
code: def validate_input_observation_space(
      self, input_observation_space: ObservationSpace
  ):
      if input_observation_space.num_dimensions != 3:
          raise ValueError(
              "The rescale filter only applies to image observations where the number of dimensions is"
              "3 (RGB). The number of dimensions defined for the input observation was {}".format(
                  input_observation_space.num_dimensions
              )
          )
      if input_observation_space.shape[-1] != 3:
          raise ValueError(
              "The observation space is expected to have 3 channels in the 1st dimension. The number of "
              "dimensions received is {}".format(
                  input_observation_space.shape[-1]
              )
          )
  
file_path: coach/rl_coach/filters/observation/observation_rgb_to_y_filter.py
imports: from rl_coach.core_types import ObservationType
  from rl_coach.filters.observation.observation_filter import ObservationFilter
  from rl_coach.spaces import ObservationSpace
label_desc: Use image node_id 2 for calling the ObservationRGBToYFilter obj's underlying member method code with example usage: obj.validate_input_observation_space(input_observation_space) without return types