code: def compute_dp_sgd_privacy(
      *,
      sample_rate: float,
      noise_multiplier: float,
      epochs: int,
      delta: float,
      alphas: List[float],
      verbose: bool = True,
  ) -> Tuple[float, float]:
      """
      Performs the DP-SGD privacy analysis.
  
      Finds sample rate and number of steps based on the input parameters, and calls
      DP-SGD privacy analysis to find the privacy loss epsilon and optimal order alpha.
  
      Args:
          sample_rate : probability of each sample from the dataset to be selected for a next batch
          noise_multiplier : The ratio of the standard deviation of the Gaussian noise
              to the L2-sensitivity of the function to which the noise is added
          epochs : Number of epochs
          delta : Target delta
          alphas : A list of RDP orders
          verbose : If enabled, will print the results of DP-SGD analysis
  
      Returns:
          Pair of privacy loss epsilon and optimal order alpha
  
      Raises:
          ValueError
              When batch size is greater than sample size
      """
      if sample_rate > 1:
          raise ValueError("sample_rate must be no greater than 1")
      steps = epochs * math.ceil(1 / sample_rate)
  
      return _apply_dp_sgd_analysis(
          sample_rate=sample_rate,
          noise_multiplier=noise_multiplier,
          steps=steps,
          alphas=alphas,
          delta=delta,
          verbose=verbose,
      )
  
imports: import argparse
  import math
  from typing import List, Tuple
  from opacus.accountants.analysis.rdp import compute_rdp, get_privacy_spent
label_desc: Use image node_id 2 for calling a global function with example usage: compute_dp_sgd_privacy() and returns: _apply_dp_sgd_analysis