code: def test_get_filtered_observation_space(rgb_to_y_filter):
      # error on observation space which are not RGB
      observation_space = ObservationSpace(np.array([1, 2, 4]), 0, 100)
      with pytest.raises(ValueError):
          rgb_to_y_filter.get_filtered_observation_space(
              "observation", observation_space
          )
  
      observation_space = ObservationSpace(np.array([1, 2, 3]), 0, 100)
      result = rgb_to_y_filter.get_filtered_observation_space(
          "observation", observation_space
      )
      assert np.all(result.shape == np.array([1, 2]))
  
file_path: coach/rl_coach/tests/filters/observation/test_observation_rgb_to_y_filter.py
imports: import os
  import sys
  import pytest
  import numpy
  from rl_coach.filters.observation.observation_rgb_to_y_filter import ObservationRGBToYFilter
  from rl_coach.spaces import ObservationSpace
  from rl_coach.core_types import EnvResponse
  from rl_coach.filters.filter import InputFilter
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_filtered_observation_space(rgb_to_y_filter) without return types