code: def test_callbacklist():
      cb1 = TrainingHistory()
      cb2 = TerminateOnNaN()
      cb3 = TrainingHistory()
  
      list0 = CallbackList([cb2])
      list1 = CallbackList([cb1, cb2])
      list2 = CallbackList([cb3])
  
      list1 = CallbackList(list1.callbacks + list2.callbacks)
      list0 = CallbackList(list0.callbacks + list2.callbacks)
  
      assert len(list1.callbacks) == 3
      assert len(list0.callbacks) == 2
  
imports: from gluonts.mx.trainer import Trainer
  from gluonts.mx.trainer.callback import CallbackList, TerminateOnNaN, WarmStart, TrainingHistory
  from gluonts.mx.trainer.model_iteration_averaging import NTA, ModelIterationAveraging
  from gluonts.dataset.repository import get_dataset
  from gluonts.mx import SimpleFeedForwardEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: test_callbacklist() without return types