code: def convert_probs(
      probs: np.ndarray, threshold: float = 0.5
  ) -> np.ndarray:
      """
      Converts all the probabilities in the array provided into binary labels
      as per the threshold provided which is 0.5 by default.
  
      Example
      ---------
  
      .. code-block:: python
  
          probs = np.array([0.1, 0.2, 0.7, 0.8, 0.6])
          labels = xai.convert_probs(probs, threshold=0.65)
          print(labels)
  
          > [0, 0, 1, 1, 0]
  
      Args
      -------
  
      probs :
          Numpy array or list containing a list of floats between 0 and 1
      threshold :
          Float that provides the threshold for which probabilities over the
          threshold will be converted to 1
  
      Returns
      ----------
  
      : np.ndarray
          Numpy array containing the labels based on threshold provided
  
      """
  
      return (probs >= threshold).astype(int)
  
imports: import pandas
  import matplotlib.pyplot
  import numpy
  from scipy.stats import spearmanr
  from scipy.cluster import hierarchy
  from typing import List, Any, Union, Tuple, Optional, Dict
  import random, math
  from sklearn.metrics import roc_curve, precision_recall_curve, roc_auc_score, confusion_matrix
  import itertools
  import logging
label_desc: Use image node_id 11 for calling a global function with example usage: convert_probs(probs, threshold) and returns: unknown