code: def test_normal_generator():
      ctx = mx.context.current_context()
      samples = 1000000
      # Default success rate is 0.25, so 2 successes of 8 trials will pass.
      trials = 8
      num_buckets = 5
      for dtype in ["float16", "float32", "float64"]:
          for mu, sigma in [(0.0, 1.0), (1.0, 5.0)]:
              buckets, probs = gen_buckets_probs_with_ppf(
                  lambda x: ss.norm.ppf(x, mu, sigma), num_buckets
              )
              # Quantize bucket boundaries to reflect the actual dtype and adjust probs accordingly
              buckets = np.array(buckets, dtype=dtype).tolist()
              probs = [
                  (
                      ss.norm.cdf(buckets[i][1], mu, sigma)
                      - ss.norm.cdf(buckets[i][0], mu, sigma)
                  )
                  for i in range(num_buckets)
              ]
              generator_mx = lambda x: mx.nd.random.normal(
                  mu, sigma, shape=x, ctx=ctx, dtype=dtype
              ).asnumpy()
              verify_generator(
                  generator=generator_mx,
                  buckets=buckets,
                  probs=probs,
                  nsamples=samples,
                  nrepeat=trials,
              )
              generator_mx_same_seed = lambda x: np.concatenate(
                  [
                      mx.nd.random.normal(
                          mu, sigma, shape=x // 10, ctx=ctx, dtype=dtype
                      ).asnumpy()
                      for _ in range(10)
                  ]
              )
              verify_generator(
                  generator=generator_mx_same_seed,
                  buckets=buckets,
                  probs=probs,
                  nsamples=samples,
                  nrepeat=trials,
              )
  
imports: import os
  import math
  import itertools
  import mxnet
  from mxnet.test_utils import verify_generator, gen_buckets_probs_with_ppf, assert_almost_equal
  import numpy
  import random
  from common import retry, random_seed
  import scipy.stats
  import unittest
  import pytest
  from mxnet.test_utils import *
  from mxnet.base import MXNetError
  from common import assertRaises
label_desc: Use image node_id 12 for calling a global function with example usage: test_normal_generator() without return types