code: def test_np_exponential():
      samples = 1000000
      # Generation test
      trials = 8
      num_buckets = 5
      for scale in [1.0, 5.0]:
          buckets, probs = gen_buckets_probs_with_ppf(
              lambda x: ss.expon.ppf(x, scale=scale), num_buckets
          )
          buckets = np.array(buckets, dtype="float32").tolist()
          probs = [
              (buckets[i][1] - buckets[i][0]) / scale
              for i in range(num_buckets)
          ]
          generator_mx_np = lambda x: mx.np.random.exponential(
              size=x
          ).asnumpy()
          verify_generator(
              generator=generator_mx_np,
              buckets=buckets,
              probs=probs,
              nsamples=samples,
              nrepeat=trials,
          )
  
imports: import itertools
  import os
  import sys
  from os import path
  import unittest
  import numpy
  import mxnet
  from mxnet import np, npx, autograd
  from mxnet.gluon import HybridBlock
  from mxnet.test_utils import same, assert_almost_equal, rand_shape_nd, rand_ndarray, use_np
  from common import retry
  from mxnet.test_utils import verify_generator, gen_buckets_probs_with_ppf, assert_exception, is_op_runnable, collapse_sum_like
  from mxnet.ndarray.ndarray import py_slice
  from mxnet.base import integer_types
  import scipy.stats
label_desc: Use image node_id 1 for calling a global function with example usage: test_np_exponential() without return types