code: def test_prob_map_generator(self, name, size):
      # set up dataset
      dataset = TestDataset(name, size)
      batch_size = 2
      data_loader = DataLoader(dataset, batch_size=batch_size)
  
      # set up engine
      def inference(engine, batch):
          pass
  
      engine = Engine(inference)
  
      # add ProbMapGenerator() to evaluator
      output_dir = os.path.join(
          os.path.dirname(__file__), "testing_data"
      )
      prob_map_gen = ProbMapProducer(output_dir=output_dir)
  
      evaluator = TestEvaluator(
          torch.device("cpu:0"),
          data_loader,
          np.ceil(size / batch_size),
          val_handlers=[prob_map_gen],
      )
  
      # set up validation handler
      validation = ValidationHandler(interval=1, validator=None)
      validation.attach(engine)
      validation.set_validator(validator=evaluator)
  
      engine.run(data_loader)
  
      prob_map = np.load(os.path.join(output_dir, name + ".npy"))
      self.assertListEqual(
          np.vstack(prob_map.nonzero()).T.tolist(),
          [[i, i + 1] for i in range(size)],
      )
      self.assertListEqual(
          prob_map[prob_map.nonzero()].tolist(),
          [i + 1 for i in range(size)],
      )
  
imports: from __future__ import annotations
  import os
  import unittest
  import numpy
  import torch
  from ignite.engine import Engine
  from parameterized import parameterized
  from monai.data import DataLoader, Dataset, MetaTensor
  from monai.engines import Evaluator
  from monai.handlers import ProbMapProducer, ValidationHandler
  from monai.utils.enums import ProbMapKeys
label_desc: Use image node_id 1 for calling the TestHandlerProbMapGenerator obj's underlying member method code with example usage: obj.test_prob_map_generator(name, size) without return types