code: def test_patience() -> None:
      assert_valid_param(
          param_name="patience", param_values=[0, 1, 10, 100]
      )
      assert_invalid_param(
          param_name="patience",
          param_values=[-2, -1],
          exp_msg="The value of `patience` should be >= 0 (type=value_error)",
      )
  
file_path: gluonts/test/mx/trainer/test_trainer.py
imports: from typing import Any, List
  import pytest
  from gluonts.mx.trainer import Trainer
label_desc: Use image node_id 2 for calling a global function with example usage: test_patience() without return types