code: def test_zarr_avg_merger_patches(
      self, arguments, patch_locations, expected
  ):
      if "compressor" in arguments:
          if arguments["compressor"] != "default":
              arguments["compressor"] = zarr.codec_registry[
                  arguments["compressor"].lower()
              ]()
      if "value_compressor" in arguments:
          if arguments["value_compressor"] != "default":
              arguments["value_compressor"] = zarr.codec_registry[
                  arguments["value_compressor"].lower()
              ]()
      if "count_compressor" in arguments:
          if arguments["count_compressor"] != "default":
              arguments["count_compressor"] = zarr.codec_registry[
                  arguments["count_compressor"].lower()
              ]()
      merger = ZarrAvgMerger(**arguments)
      for pl in patch_locations:
          merger.aggregate(pl[0], pl[1])
      output = merger.finalize()
      if "value_dtype" in arguments:
          self.assertTrue(
              merger.get_values().dtype, arguments["value_dtype"]
          )
      if "count_dtype" in arguments:
          self.assertTrue(
              merger.get_counts().dtype, arguments["count_dtype"]
          )
      # check for multiple call of finalize
      self.assertIs(output, merger.finalize())
      # check if the result is matching the expectation
      assert_allclose(output[:], expected.numpy())
  
file_path: MONAI/tests/test_zarr_avg_merger.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from torch.nn.functional import pad
  from monai.inferers import ZarrAvgMerger
  from monai.utils import optional_import
  from tests.utils import assert_allclose
label_desc: Use image node_id 1 for calling the ZarrAvgMergerTests obj's underlying member method code with example usage: obj.test_zarr_avg_merger_patches(arguments, patch_locations, expected) without return types