code: def format_segmentation_masks(
      y_true: np.ndarray, y_pred: np.ndarray, threshold
  ):
      """Bring the ground truth and the prediction masks to the same format (C, W, H) with values 1.0 or 0.0."""
      pred_onehot = np.where(y_pred > threshold, 1.0, 0.0)
      label_onehot = np.zeros_like(pred_onehot)
      for channel in range(pred_onehot.shape[0]):
          label_onehot[channel] = y_true == channel
      return label_onehot, pred_onehot
  
imports: from typing import Tuple
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: format_segmentation_masks(y_true, y_pred, threshold) and returns: label_onehot,  pred_onehot