code: def test_np_logistic():
      samples = 1000000
      # Generation test
      trials = 8
      num_buckets = 20
      for loc, scale in [(0.0, 1.0), (1.0, 5.0)]:
          buckets, probs = gen_buckets_probs_with_ppf(
              lambda x: ss.logistic.ppf(x, loc=loc, scale=scale),
              num_buckets,
          )
          buckets = np.array(buckets).tolist()
          probs = [
              (
                  ss.logistic.cdf(buckets[i][1], loc, scale)
                  - ss.logistic.cdf(buckets[i][0], loc, scale)
              )
              for i in range(num_buckets)
          ]
          generator_mx_np = lambda x: mx.np.random.logistic(
              loc, scale, 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 3 for calling a global function with example usage: test_np_logistic() without return types