class_docstr: Dictionary-based wrapper of :py:class:`monai.apps.pathology.transforms.post.array.GenerateInstanceCentroid`.
  Generate instance centroid using `skimage.measure.centroid`.
  
  Args:
      keys: keys of the corresponding items to be transformed.
      centroid_key_postfix: the output centroid coordinates will be written to the value of
          `{key}_{centroid_key_postfix}`.
      offset_key: keys of offset used in `GenerateInstanceCentroid`.
      dtype: the data type of output centroid.
      allow_missing_keys: don't raise exception if key is missing.
code: def __call__(self, data):
      d = dict(data)
      for key in self.key_iterator(d):
          offset = d[self.offset_key] if self.offset_key else None
          centroid = self.converter(d[key], offset)
          key_to_add = f"{key}_{self.centroid_key_postfix}"
          if key_to_add in d:
              raise KeyError(
                  f"Centroid with key {key_to_add} already exists."
              )
          d[key_to_add] = centroid
      return d
  
imports: from __future__ import annotations
  from collections.abc import Callable, Hashable, Mapping
  import numpy
  import torch
  from monai.apps.pathology.transforms.post.array import GenerateDistanceMap, GenerateInstanceBorder, GenerateInstanceCentroid, GenerateInstanceContour, GenerateInstanceType, GenerateSuccinctContour, GenerateWatershedMarkers, GenerateWatershedMask, HoVerNetInstanceMapPostProcessing, HoVerNetNuclearTypePostProcessing, Watershed
  from monai.config.type_definitions import DtypeLike, KeysCollection, NdarrayOrTensor
  from monai.transforms.transform import MapTransform, Transform
  from monai.utils import optional_import
  from monai.utils.enums import HoVerNetBranch
label_desc: Use image node_id 2 for calling the GenerateInstanceCentroidd obj's underlying member method code with example usage: obj.__call__(data) and returns: d