code: def convert_logit_to_prob(logit: np.ndarray) -> np.ndarray:
      """Converts logits to probability vectors.
  
      Args:
        logit: n by c array where n is the number of samples and c is the number of
          classes.
  
      Returns:
        The probability vectors as n by c array
      """
      prob = logit - np.max(logit, axis=1, keepdims=True)
      prob = np.array(np.exp(prob), dtype=np.float64)
      prob = prob / np.sum(prob, axis=1, keepdims=True)
      return prob
  
file_path: privacy/tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/advanced_mia.py
imports: import functools
  from typing import Optional, Sequence, Union
  import numpy
  import scipy.stats
  from tensorflow_privacy.privacy.privacy_tests.utils import log_loss
label_desc: Use image node_id 4 for calling a global function with example usage: convert_logit_to_prob(logit) and returns: prob