def get_privacy_spent(log_moments, target_eps=None, target_delta=None):
 assert ((target_eps is None) ^ (target_delta is None))
 assert (not ((target_eps is None) and (target_delta is None)))
 if (target_eps is not None):
  return (target_eps, _compute_delta(log_moments, target_eps))
 else:
  return (_compute_eps(log_moments, target_delta), target_delta)

def get_privacy_spent ( log_moments , target_eps = None , target_delta = None ) : assert ( ( target_eps is None ) ^ ( target_delta is None ) ) assert ( not ( ( target_eps is None ) and ( target_delta is None ) ) ) if ( target_eps is not None ) : return ( target_eps , _compute_delta ( log_moments , target_eps ) ) else : return ( _compute_eps ( log_moments , target_delta ) , target_delta )
compute delta for given eps from log moments .