code: def main(argv):
      del argv  # Unused.
      lambda_laplace = 50.0  # corresponds to eps = 1. / lambda_laplace
  
      # Paramaters of the GNMax
      gnmax_parameters = (
          {"t": 1000, "sigma1": 500},
          {"t": 3500, "sigma1": 1500},
          {"t": 5000, "sigma1": 1500},
      )
      sigma2 = (
          100  # GNMax parameters differ only in Step 1 (selection).
      )
      ftemp_name = "/tmp/precomputed.pkl"
  
      figures_dir = os.path.expanduser(FLAGS.figures_dir)
  
      if FLAGS.cache and os.path.isfile(ftemp_name):
          print("Reading from cache " + ftemp_name)
          with open(ftemp_name, "rb") as f:
              (
                  eps_lap,
                  eps_gnmax,
                  partition_gmax,
                  answered_gnmax,
                  orders_opt_gnmax,
              ) = pickle.load(f)
      else:
          fin_name = os.path.expanduser(FLAGS.counts_file)
          print("Reading raw votes from " + fin_name)
          sys.stdout.flush()
  
          votes = np.load(fin_name)
  
          (
              eps_lap,
              eps_gnmax,
              partition_gmax,
              answered_gnmax,
              orders_opt_gnmax,
          ) = run_all_analyses(
              votes, lambda_laplace, gnmax_parameters, sigma2
          )
  
          print("Writing to cache " + ftemp_name)
          with open(ftemp_name, "wb") as f:
              pickle.dump(
                  (
                      eps_lap,
                      eps_gnmax,
                      partition_gmax,
                      answered_gnmax,
                      orders_opt_gnmax,
                  ),
                  f,
              )
  
      print_plot_small(
          figures_dir, eps_lap, eps_gnmax[0], answered_gnmax[0]
      )
      print_plot_large(
          figures_dir,
          eps_lap,
          eps_gnmax[1],
          answered_gnmax[1],
          eps_gnmax[2],
          partition_gmax[2],
          answered_gnmax[2],
      )
      plt.close("all")
  
file_path: privacy/research/pate_2018/ICLR2018/rdp_cumulative.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import os
  import pickle
  import sys
  from absl import app
  from absl import flags
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import core
label_desc: Use image node_id 5 for calling a global function with example usage: main(argv) without return types