code: def test_filter():
      rescale_filter = InputFilter(
          reward_filters=OrderedDict(
              [("rescale", RewardRescaleFilter(1 / 10.0))]
          )
      )
      env_response = EnvResponse(
          next_state={"observation": np.zeros(10)},
          reward=100,
          game_over=False,
      )
      print(rescale_filter.observation_filters)
      result = rescale_filter.filter(env_response)[0]
      unfiltered_reward = env_response.reward
      filtered_reward = result.reward
  
      # validate that the reward was clipped correctly
      assert filtered_reward == 10
  
      # make sure the original reward is unchanged
      assert unfiltered_reward == 100
  
      # negative reward
      env_response = EnvResponse(
          next_state={"observation": np.zeros(10)},
          reward=-50,
          game_over=False,
      )
      result = rescale_filter.filter(env_response)[0]
      assert result.reward == -5
  
file_path: coach/rl_coach/tests/filters/reward/test_reward_rescale_filter.py
imports: import os
  import sys
  import pytest
  import numpy
  from rl_coach.filters.reward.reward_rescale_filter import RewardRescaleFilter
  from rl_coach.spaces import RewardSpace
  from rl_coach.core_types import EnvResponse
  from rl_coach.filters.filter import InputFilter
  from collections import OrderedDict
label_desc: Use image node_id 1 for calling a global function with example usage: test_filter() without return types