code: def stack_complement(pred_prob_slice: np.ndarray) -> np.ndarray:
      """
      Extends predicted probabilities of a single class to two columns.
  
      Parameters
      ----------
      pred_prob_slice:
          A 1D array with predicted probabilities for a single class.
  
      Example
      -------
      >>> pred_prob_slice = np.array([0.1, 0.9, 0.3, 0.8])
      >>> stack_complement(pred_prob_slice)
      array([[0.9, 0.1],
              [0.1, 0.9],
              [0.7, 0.3],
              [0.2, 0.8]])
      """
      return np.vstack((1 - pred_prob_slice, pred_prob_slice)).T
  
file_path: cleanlab/cleanlab/internal/multilabel_utils.py
imports: from typing import Tuple, Optional, List
  import numpy
  from cleanlab.internal.util import get_num_classes
label_desc: Use image node_id 2 for calling a global function with example usage: stack_complement(pred_prob_slice) and returns: np