code: def compute_ls_q(sigma, order, num_classes):
      def beta(q):
          return pate_ss._compute_rdp_gnmax(sigma, math.log(q), order)
  
      def bu(q):
          return pate_ss._compute_bu_gnmax(q, sigma, order)
  
      def bl(q):
          return pate_ss._compute_bl_gnmax(q, sigma, order)
  
      def delta_beta(q):
          if q == 0 or q > 0.8:
              return 0
          beta_q = beta(q)
          beta_bu_q = beta(bu(q))
          beta_bl_q = beta(bl(q))
          assert beta_bl_q <= beta_q <= beta_bu_q
          return (
              beta_bu_q - beta_q
          )  # max(beta_bu_q - beta_q, beta_q - beta_bl_q)
  
      logq0 = pate_ss.compute_logq0_gnmax(sigma, order)
      logq1 = pate_ss._compute_logq1(sigma, order, num_classes)
      print(math.exp(logq1), math.exp(logq0))
      xs = np.linspace(0, 0.1, num=1000, endpoint=True)
      ys = [delta_beta(x) for x in xs]
      return xs, ys
  
file_path: privacy/research/pate_2018/ICLR2018/plot_ls_q.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import os
  import sys
  from absl import app
  from absl import flags
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import smooth_sensitivity
label_desc: Use image node_id 1 for calling a global function with example usage: compute_ls_q(sigma, order, num_classes) and returns: xs,  ys, pate_ss, pate_ss, pate_ss, unknown, int