code: def _compute_rdp(q: float, sigma: float, alpha: float) -> float:
      r"""Computes RDP of the Sampled Gaussian Mechanism at order ``alpha``.
  
      Args:
          q: Sampling rate of SGM.
          sigma: The standard deviation of the additive Gaussian noise.
          alpha: The order at which RDP is computed.
  
      Returns:
          RDP at order ``alpha``; can be np.inf.
      """
      if q == 0:
          return 0
  
      # no privacy
      if sigma == 0:
          return np.inf
  
      if q == 1.0:
          return alpha / (2 * sigma**2)
  
      if np.isinf(alpha):
          return np.inf
  
      return _compute_log_a(q, sigma, alpha) / (alpha - 1)
  
file_path: opacus/opacus/accountants/analysis/rdp.py
imports: import math
  import warnings
  from typing import List, Tuple, Union
  import numpy
  from scipy import special
label_desc: Use image node_id 7 for calling a global function with example usage: _compute_rdp(q, sigma, alpha) and returns: unknown, int, np, unknown, np