code: def test_filter(rgb_to_y_filter):
      # convert RGB observation to graysacle
      observation = np.random.rand(20, 30, 3) * 255.0
      transition = EnvResponse(
          next_state={"observation": observation},
          reward=0,
          game_over=False,
      )
  
      result = rgb_to_y_filter.filter(transition)[0]
      unfiltered_observation = transition.next_state["observation"]
      filtered_observation = result.next_state["observation"]
  
      # make sure the original observation is unchanged
      assert unfiltered_observation.shape == (20, 30, 3)
  
      # make sure the filtering is done correctly
      assert filtered_observation.shape == (20, 30)
  
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 2 for calling a global function with example usage: test_filter(rgb_to_y_filter) without return types