code: def compute_epsilon(train_size):
      """Computes epsilon value for given hyperparameters."""
      if FLAGS.noise_multiplier == 0.0:
          return float("inf")
      orders = [1 + x / 10.0 for x in range(1, 100)] + list(
          range(12, 64)
      )
      sampling_probability = FLAGS.batch_size / train_size
      steps = FLAGS.epochs * train_size / FLAGS.batch_size
      rdp = compute_rdp(
          q=sampling_probability,
          noise_multiplier=FLAGS.noise_multiplier,
          steps=steps,
          orders=orders,
      )
      # Delta is set to approximate 1 / (number of training points).
      return get_privacy_spent(orders, rdp, target_delta=1e-5)[0]
  
file_path: privacy/research/audit_2020/fmnist_audit.py
imports: import numpy
  import tensorflow.compat.v1
  from tensorflow_privacy.privacy.analysis.rdp_accountant import compute_rdp
  from tensorflow_privacy.privacy.analysis.rdp_accountant import get_privacy_spent
  from tensorflow_privacy.privacy.optimizers import dp_optimizer_vectorized
  from absl import app
  from absl import flags
  import audit
label_desc: Use image node_id 1 for calling a global function with example usage: compute_epsilon(train_size) and returns: get_privacy_spent, float