code: def test_serialize(serialize_test, hyperparameters, dsinfo):
      forecaster = TreeEstimator.from_hyperparameters(
          freq=dsinfo.freq,
          **{
              "prediction_length": dsinfo.prediction_length,
              "num_parallel_samples": dsinfo.num_parallel_samples,
          },
          **hyperparameters,
      )
  
      predictor_act = forecaster.train(dsinfo.train_ds)
  
      with tempfile.TemporaryDirectory() as temp_dir:
          predictor_act.serialize(Path(temp_dir))
          predictor_exp = TreePredictor.deserialize(Path(temp_dir))
          assert predictor_act == predictor_exp
          assert predictor_act.model_list == predictor_exp.model_list
  
imports: from pathlib import Path
  import pytest
  import tempfile
  from gluonts.ext.rotbaum import TreeEstimator, TreePredictor
label_desc: Use image node_id 3 for calling a global function with example usage: test_serialize(serialize_test, hyperparameters, dsinfo) without return types