code: def _compute_log_a_for_int_alpha(
      q: float, sigma: float, alpha: int
  ) -> float:
      r"""Computes :math:`log(A_\alpha)` for integer ``alpha``.
  
      Notes:
          Note that
          :math:`A_\alpha` is real valued function of ``alpha`` and ``q``,
          and that 0 < ``q`` < 1.
  
          Refer to Section 3.3 of https://arxiv.org/pdf/1908.10530.pdf for details.
  
      Args:
          q: Sampling rate of SGM.
          sigma: The standard deviation of the additive Gaussian noise.
          alpha: The order at which RDP is computed.
  
      Returns:
          :math:`log(A_\alpha)` as defined in Section 3.3 of
          https://arxiv.org/pdf/1908.10530.pdf.
      """
  
      # Initialize with 0 in the log space.
      log_a = -np.inf
  
      for i in range(alpha + 1):
          log_coef_i = (
              math.log(special.binom(alpha, i))
              + i * math.log(q)
              + (alpha - i) * math.log(1 - q)
          )
  
          s = log_coef_i + (i * i - i) / (2 * (sigma**2))
          log_a = _log_add(log_a, s)
  
      return float(log_a)
  
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 3 for calling a global function with example usage: _compute_log_a_for_int_alpha(q, sigma, alpha) and returns: float