class_docstr: Dictionary-based wrapper of :py:class:`monai.apps.pathology.transforms.array.GenerateInstanceBorder`.
  
  Args:
      mask_key: the input key where the watershed mask is stored. Defaults to `"mask"`.
      hover_map_key: the input key where hover map is stored. Defaults to `"hover_map"`.
      border_key: the output key where instance border map is written. Defaults to `"border"`.
      kernel_size: the size of the Sobel kernel. Defaults to 21.
      dtype: target data content type to convert, default is np.float32.
      allow_missing_keys: don't raise exception if key is missing.
  
  Raises:
      ValueError: when the `hover_map` has only one value.
      ValueError: when the `sobel gradient map` has only one value.
code: def __call__(
      self, data: Mapping[Hashable, NdarrayOrTensor]
  ) -> dict[Hashable, NdarrayOrTensor]:
      d = dict(data)
      if self.border_key in d:
          raise KeyError(
              f"The key '{self.border_key}' for instance border map already exists."
          )
      d[self.border_key] = self.transform(
          d[self.mask_key], d[self.hover_map_key]
      )
      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 GenerateInstanceBorderd obj's underlying member method code with example usage: obj.__call__(data) and returns: d