code: def test_piece_wise_schedule():
      # decreasing schedule
      schedule = PieceWiseSchedule(
          [
              (LinearSchedule(1, 3, 10), EnvironmentSteps(5)),
              (ConstantSchedule(4), EnvironmentSteps(10)),
              (ExponentialSchedule(3, 1, 0.99), EnvironmentSteps(10)),
          ]
      )
  
      target_values = np.append(np.linspace(1, 2, 6), np.ones(11) * 4)
      for i in range(16):
          assert round(schedule.current_value, 4) == round(
              target_values[i], 4
          )
          schedule.step()
  
      current_power = 1
      for i in range(10):
          assert round(schedule.current_value, 4) == round(
              3 * current_power, 4
          )
          current_power *= 0.99
          schedule.step()
  
file_path: coach/rl_coach/tests/test_schedules.py
imports: import os
  import sys
  from rl_coach.core_types import EnvironmentSteps
  import pytest
  from rl_coach.schedules import LinearSchedule, ConstantSchedule, ExponentialSchedule, PieceWiseSchedule
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: test_piece_wise_schedule() without return types