code: def test_get_filtered_reward_space(clip_filter):
      # reward is clipped
      reward_space = RewardSpace(1, -100, 100)
      filtered_reward_space = clip_filter.get_filtered_reward_space(
          reward_space
      )
  
      # make sure the new reward space shape is calculated correctly
      assert filtered_reward_space.shape == 1
      assert filtered_reward_space.low == 2
      assert filtered_reward_space.high == 10
  
      # reward is unclipped
      reward_space = RewardSpace(1, 5, 7)
      filtered_reward_space = clip_filter.get_filtered_reward_space(
          reward_space
      )
  
      # make sure the new reward space shape is calculated correctly
      assert filtered_reward_space.shape == 1
      assert filtered_reward_space.low == 5
      assert filtered_reward_space.high == 7
  
      # infinite reward is clipped
      reward_space = RewardSpace(1, -np.inf, np.inf)
      filtered_reward_space = clip_filter.get_filtered_reward_space(
          reward_space
      )
  
      # make sure the new reward space shape is calculated correctly
      assert filtered_reward_space.shape == 1
      assert filtered_reward_space.low == 2
      assert filtered_reward_space.high == 10
  
file_path: coach/rl_coach/tests/filters/reward/test_reward_clipping_filter.py
imports: import os
  import sys
  import pytest
  import numpy
  from rl_coach.filters.reward.reward_clipping_filter import RewardClippingFilter
  from rl_coach.spaces import RewardSpace
  from rl_coach.core_types import EnvResponse
  from collections import OrderedDict
  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_reward_space(clip_filter) without return types