code: def mask_to_binary_edge(mask, radius, num_classes):
      """
      Convert a segmentic segmentation mask (H, W) to a binary edge mask(H, W).
  
      Args:
          mask (np.ndarray): Label mask with shape (H, W)
          radius (int|float): Radius of edge.
          num_classes (int): Number of classes.
  
      Returns:
          np.ndarray: Edge mask with shape(H, W).
      """
      mask = mask.squeeze()
      onehot = mask_to_onehot(mask, num_classes)
      edge = onehot_to_binary_edge(onehot, radius)
      return edge
  
imports: import cv2
  import numpy
  from PIL import Image, ImageEnhance
  from scipy.ndimage import distance_transform_edt
label_desc: Use image node_id 17 for calling a global function with example usage: mask_to_binary_edge(mask, radius, num_classes) and returns: edge