class_docstr: Merge patches by taking average of the overlapping area and store the results in zarr array.
  
  Zarr is a format for the storage of chunked, compressed, N-dimensional arrays.
  Zarr data can be stored in any storage system that can be represented as a key-value store,
  like POSIX file systems, cloud object storage, zip files, and relational and document databases.
  See https://zarr.readthedocs.io/en/stable/ for more details.
  It is particularly useful for storing N-dimensional arrays too large to fit into memory.
  One specific use case of this class is to merge patches extracted from whole slide images (WSI),
  where the merged results do not fit into memory and need to be stored on a file system.
  
  Args:
      merged_shape: the shape of the tensor required to merge the patches.
      cropped_shape: the shape of the final merged output tensor.
          If not provided, it will be the same as `merged_shape`.
      dtype: the dtype for the final merged result. Default is `float32`.
      value_dtype: the dtype for value aggregating tensor and the final result. Default is `float32`.
      count_dtype: the dtype for sample counting tensor. Default is `uint8`.
      store: the zarr store to save the final results. Default is "merged.zarr".
      value_store: the zarr store to save the value aggregating tensor. Default is a temporary store.
      count_store: the zarr store to save the sample counting tensor. Default is a temporary store.
      compressor: the compressor for final merged zarr array. Default is "default".
      value_compressor: the compressor for value aggregating zarr array. Default is None.
      count_compressor: the compressor for sample counting zarr array. Default is None.
      chunks : int or tuple of ints that defines the chunk shape, or boolean. Default is True.
          If True, chunk shape will be guessed from `shape` and `dtype`.
          If False, it will be set to `shape`, i.e., single chunk for the whole array.
          If an int, the chunk size in each dimension will be given by the value of `chunks`.
docstr: Get the aggregator tensor for number of samples.
  
  Returns:
      zarr.Array: Number of accumulated samples at each location.
docstr_tok: ["Get","the","aggregator","tensor","for","number","of","samples",".","Returns",":","zarr.Array",":","Number","of","accumulated","samples","at","each","location","."]
code: def get_counts(self) -> zarr.Array:
      """
      Get the aggregator tensor for number of samples.
  
      Returns:
          zarr.Array: Number of accumulated samples at each location.
      """
      return self.counts
  
imports: from __future__ import annotations
  import threading
  from abc import ABC, abstractmethod
  from collections.abc import Sequence
  from contextlib import nullcontext
  from typing import TYPE_CHECKING, Any
  import numpy
  import torch
  from monai.utils import ensure_tuple_size, optional_import, require_pkg
label_desc: Use image node_id 6 for calling the ZarrAvgMerger obj's underlying member method code with example usage: obj.get_counts() and returns: self