class_docstr: Use `skimage.segmentation.watershed` to get instance segmentation results from images.
  See: https://scikit-image.org/docs/stable/api/skimage.segmentation.html#skimage.segmentation.watershed.
  
  Args:
      connectivity: an array with the same number of dimensions as image whose non-zero elements indicate
          neighbors for connection. Following the scipy convention, default is a one-connected array of
          the dimension of the image.
      dtype: target data content type to convert, default is np.int64.
class_docstr_tok: ["Use","`","skimage.segmentation.watershed","`","to","get","instance","segmentation","results","from","images",".","See",":","https",":","\/\/scikit-image.org\/docs\/stable\/api\/skimage.segmentation.html","#","skimage.segmentation.watershed",".","Args",":","connectivity",":","an","array","with","the","same","number","of","dimensions","as","image","whose","non-zero","elements","indicate","neighbors","for","connection",".","Following","the","scipy","convention",",","default","is","a","one-connected","array","of","the","dimension","of","the","image",".","dtype",":","target","data","content","type","to","convert",",","default","is","np.int64","."]
docstr: Args:
      image: image where the lowest value points are labeled first. Shape must be [1, H, W, [D]].
      mask: optional, the same shape as image. Only points at which mask == True will be labeled.
          If None (no mask given), it is a volume of all 1s.
      markers: optional, the same shape as image. The desired number of markers, or an array marking
          the basins with the values to be assigned in the label matrix. Zero means not a marker.
          If None (no markers given), the local minima of the image are used as markers.
docstr_tok: ["Args",":","image",":","image","where","the","lowest","value","points","are","labeled","first",".","Shape","must","be","[","1",",","H",",","W",",","[","D","]","]",".","mask",":","optional",",","the","same","shape","as","image",".","Only","points","at","which","mask","==","True","will","be","labeled",".","If","None","(","no","mask","given",")",",","it","is","a","volume","of","all","1s",".","markers",":","optional",",","the","same","shape","as","image",".","The","desired","number","of","markers",",","or","an","array","marking","the","basins","with","the","values","to","be","assigned","in","the","label","matrix",".","Zero","means","not","a","marker",".","If","None","(","no","markers","given",")",",","the","local","minima","of","the","image","are","used","as","markers","."]
code: def __call__(
      self,
      image: NdarrayOrTensor,
      mask: NdarrayOrTensor | None = None,
      markers: NdarrayOrTensor | None = None,
  ) -> NdarrayOrTensor:
      """
      Args:
          image: image where the lowest value points are labeled first. Shape must be [1, H, W, [D]].
          mask: optional, the same shape as image. Only points at which mask == True will be labeled.
              If None (no mask given), it is a volume of all 1s.
          markers: optional, the same shape as image. The desired number of markers, or an array marking
              the basins with the values to be assigned in the label matrix. Zero means not a marker.
              If None (no markers given), the local minima of the image are used as markers.
      """
  
      image = convert_to_numpy(image)
      markers = convert_to_numpy(markers)
      mask = convert_to_numpy(mask)
  
      instance_seg = watershed(
          image,
          markers=markers,
          mask=mask,
          connectivity=self.connectivity,
      )
  
      return convert_to_dst_type(instance_seg, image, 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 Watershed obj's underlying member method code with example usage: obj.__call__(image, mask, markers) and returns: convert_to_dst_type