class_docstr: Generate markers to be used in `watershed`. The watershed algorithm treats pixels values as a local topography
  (elevation). The algorithm floods basins from the markers until basins attributed to different markers meet on
  watershed lines. Generally, markers are chosen as local minima of the image, from which basins are flooded.
  Here is the implementation from HoVerNet paper.
  For more details refer to papers: https://arxiv.org/abs/1812.06499.
  
  Args:
      threshold: a float value to threshold to binarize instance border map.
          It turns uncertain area to 1 and other area to 0. Defaults to 0.4.
      radius: the radius of the disk-shaped footprint used in `opening`. Defaults to 2.
      min_object_size: objects smaller than this size (in pixel) are removed. Defaults to 10.
      postprocess_fn: additional post-process function on the markers.
          If not provided, :py:class:`monai.transforms.post.FillHoles()` will be used.
      dtype: target data type to convert to. Defaults to np.int64.
class_docstr_tok: ["Generate","markers","to","be","used","in","`","watershed","`",".","The","watershed","algorithm","treats","pixels","values","as","a","local","topography","(","elevation",")",".","The","algorithm","floods","basins","from","the","markers","until","basins","attributed","to","different","markers","meet","on","watershed","lines",".","Generally",",","markers","are","chosen","as","local","minima","of","the","image",",","from","which","basins","are","flooded",".","Here","is","the","implementation","from","HoVerNet","paper",".","For","more","details","refer","to","papers",":","https",":","\/\/arxiv.org\/abs\/1812.06499",".","Args",":","threshold",":","a","float","value","to","threshold","to","binarize","instance","border","map",".","It","turns","uncertain","area","to","1","and","other","area","to","0",".","Defaults","to","0.4.","radius",":","the","radius","of","the","disk-shaped","footprint","used","in","`","opening","`",".","Defaults","to","2.","min_object_size",":","objects","smaller","than","this","size","(","in","pixel",")","are","removed",".","Defaults","to","10.","postprocess_fn",":","additional","post-process","function","on","the","markers",".","If","not","provided",",",":","py",":","class",":","`","monai.transforms.post.FillHoles","(",")","`","will","be","used",".","dtype",":","target","data","type","to","convert","to",".","Defaults","to","np.int64","."]
docstr: Args:
      mask: binary segmentation map, the output of :py:class:`GenerateWatershedMask`.
          Shape must be [1, H, W] or [H, W].
      instance_border: instance border map, the output of :py:class:`GenerateInstanceBorder`.
          Shape must be [1, H, W].
docstr_tok: ["Args",":","mask",":","binary","segmentation","map",",","the","output","of",":","py",":","class",":","`","GenerateWatershedMask","`",".","Shape","must","be","[","1",",","H",",","W","]","or","[","H",",","W","]",".","instance_border",":","instance","border","map",",","the","output","of",":","py",":","class",":","`","GenerateInstanceBorder","`",".","Shape","must","be","[","1",",","H",",","W","]","."]
code: def __call__(self, mask: NdarrayOrTensor, instance_border: NdarrayOrTensor) -> NdarrayOrTensor:  # type: ignore
      """
      Args:
          mask: binary segmentation map, the output of :py:class:`GenerateWatershedMask`.
              Shape must be [1, H, W] or [H, W].
          instance_border: instance border map, the output of :py:class:`GenerateInstanceBorder`.
              Shape must be [1, H, W].
      """
      if len(mask.shape) == 3:
          if mask.shape[0] != 1:
              raise ValueError(
                  f"The mask should have only one channel, but got {mask.shape[0]}."
              )
      elif len(mask.shape) == 2:
          mask = mask[None]
      else:
          raise ValueError(
              f"The mask should have the shape of [1, H, W] or [H, W], but got {mask.shape}."
          )
      if instance_border.shape[0] != 1 or instance_border.ndim != 3:
          raise ValueError(
              f"Input instance_border should be with size of [1, H, W], but got {instance_border.shape}"
          )
  
      instance_border = (
          instance_border >= self.threshold
      )  # uncertain area
  
      marker = (
          mask - convert_to_dst_type(instance_border, mask)[0]
      )  # certain foreground
      marker[marker < 0] = 0  # type: ignore
      marker = self.postprocess_fn(marker)
      marker = convert_to_numpy(marker)
  
      marker = opening(marker.squeeze(), disk(self.radius))
      marker = label(marker)[0][None]
      if self.remove_small_objects is not None:
          marker = self.remove_small_objects(marker)
  
      return convert_to_dst_type(marker, mask, dtype=self.dtype)[0]
  
imports: from __future__ import annotations
  import warnings
  from typing import Callable, Sequence
  import numpy
  import torch
  from monai.config.type_definitions import DtypeLike, NdarrayOrTensor
  from monai.transforms import Activations, AsDiscrete, BoundingRect, FillHoles, GaussianSmooth, RemoveSmallObjects, SobelGradients
  from monai.transforms.transform import Transform
  from monai.transforms.utils_pytorch_numpy_unification import max, maximum, min, sum, unique
  from monai.utils import TransformBackends, convert_to_numpy, optional_import
  from monai.utils.misc import ensure_tuple_rep
  from monai.utils.type_conversion import convert_to_dst_type, convert_to_tensor
label_desc: Use image node_id 2 for calling the GenerateWatershedMarkers obj's underlying member method code with example usage: obj.__call__(mask, instance_border) and returns: convert_to_dst_type