code: def compute_rdp(
      *,
      q: float,
      noise_multiplier: float,
      steps: int,
      orders: Union[List[float], float],
  ) -> Union[List[float], float]:
      r"""Computes Renyi Differential Privacy (RDP) guarantees of the
      Sampled Gaussian Mechanism (SGM) iterated ``steps`` times.
  
      Args:
          q: Sampling rate of SGM.
          noise_multiplier: The ratio of the standard deviation of the
              additive Gaussian noise to the L2-sensitivity of the function
              to which it is added. Note that this is same as the standard
              deviation of the additive Gaussian noise when the L2-sensitivity
              of the function is 1.
          steps: The number of iterations of the mechanism.
          orders: An array (or a scalar) of RDP orders.
  
      Returns:
          The RDP guarantees at all orders; can be ``np.inf``.
      """
      if isinstance(orders, float):
          rdp = _compute_rdp(q, noise_multiplier, orders)
      else:
          rdp = np.array(
              [
                  _compute_rdp(q, noise_multiplier, order)
                  for order in orders
              ]
          )
  
      return rdp * steps
  
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 8 for calling a global function with example usage: compute_rdp() and returns: unknown