code: def read_binary_mask(mask_fname: str) -> np.ndarray:
      """
      Read image as binary mask, all non-zero values are treated as positive labels and converted to 1
      Args:
          mask_fname: Image with mask
  
      Returns:
          Numpy array with {0,1} values
      """
      mask = cv2.imread(mask_fname, cv2.IMREAD_GRAYSCALE)
      if mask is None:
          raise FileNotFoundError(f"Cannot find {mask_fname}")
  
      cv2.threshold(
          mask, thresh=0, maxval=1, type=cv2.THRESH_BINARY, dst=mask
      )
      return mask
  
file_path: pytorch-toolbelt/pytorch_toolbelt/datasets/segmentation.py
imports: from functools import partial
  from typing import Optional, List, Callable
  import albumentations
  import cv2
  import numpy
  from skimage.measure import block_reduce
  from torch.utils.data import Dataset
  from .common import read_image_rgb, INPUT_IMAGE_KEY, INPUT_IMAGE_ID_KEY, INPUT_INDEX_KEY, TARGET_MASK_WEIGHT_KEY, TARGET_MASK_KEY, name_for_stride
  from ..utils import fs, image_to_tensor
label_desc: Use image node_id 5 for calling a global function with example usage: read_binary_mask(mask_fname) and returns: mask