code: def random_exponential(shape, rate=1.0, dtype=tf.float32, seed=None):
      """
      Helper function to sample from the exponential distribution, which is not
      included in core TensorFlow.
  
      shape: shape of the sampled tensor.
      :rate: (optional) rate parameter of the exponential distribution, defaults to 1.0.
      :dtype: (optional) data type of the sempled tensor, defaults to tf.float32.
      :seed: (optional) custom seed to be used for sampling.
      """
      return tf.random.gamma(
          shape, alpha=1, beta=1.0 / rate, dtype=dtype, seed=seed
      )
  
file_path: cleverhans/cleverhans/tf2/utils.py
imports: import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: random_exponential(shape, rate, dtype, seed) and returns: tf