code: def test_ensemble_runner(self) -> None:
      runner = EnsembleRunner(
          data_src_cfg_name=self.data_src_cfg_name, mgpu=False
      )
      runner.set_num_fold(3)
      self.assertTrue(runner.num_fold == 3)
      runner.set_ensemble_method(
          ensemble_method_name="AlgoEnsembleBestByFold"
      )
      self.assertIsInstance(
          runner.ensemble_method, AlgoEnsembleBestByFold
      )
      self.assertTrue(runner.ensemble_method.n_fold == 3)  # type: ignore
  
      runner.set_ensemble_method(
          ensemble_method_name="AlgoEnsembleBestN", n_best=3
      )
      self.assertIsInstance(runner.ensemble_method, AlgoEnsembleBestN)
      self.assertTrue(runner.ensemble_method.n_best == 3)
  
      save_output = os.path.join(self.test_dir.name, "workdir")
      save_image = runner._pop_kwargs_to_get_image_save_transform(
          output_dir=save_output,
          output_postfix="test_ensemble",
          output_dtype=float,
          resample=True,
      )
      self.assertIsInstance(
          ConfigParser(save_image).get_parsed_content(), SaveImage
      )
  
imports: from __future__ import annotations
  import os
  import tempfile
  import unittest
  import nibabel
  import numpy
  import torch
  from monai.apps.auto3dseg import AlgoEnsembleBestByFold, AlgoEnsembleBestN, AlgoEnsembleBuilder, BundleGen, DataAnalyzer, EnsembleRunner
  from monai.bundle.config_parser import ConfigParser
  from monai.data import create_test_image_3d
  from monai.transforms import SaveImage
  from monai.utils import check_parent_dir, optional_import, set_determinism
  from monai.utils.enums import AlgoKeys
  from tests.utils import SkipIfBeforePyTorchVersion, get_testing_algo_template_path, skip_if_downloading_fails, skip_if_no_cuda, skip_if_quick
label_desc: Use image node_id 3 for calling the TestEnsembleBuilder obj's underlying member method code with example usage: obj.test_ensemble_runner() without return types