code: def test_randint_generator():
      ctx = mx.context.current_context()
      for dtype in ["int32", "int64"]:
          for low, high in [
              (50000000, 50001000),
              (-50000100, -50000000),
              (-500, 199),
          ]:
              scale = high - low
              buckets, probs = gen_buckets_probs_with_ppf(
                  lambda x: ss.uniform.ppf(x, loc=low, scale=scale), 5
              )
              # Quantize bucket boundaries to reflect the actual dtype and adjust probs accordingly
              buckets = np.array(buckets, dtype=dtype).tolist()
              probs = [
                  (buckets[i][1] - buckets[i][0]) / float(scale)
                  for i in range(5)
              ]
              generator_mx = lambda x: mx.nd.random.randint(
                  low, high, shape=x, ctx=ctx, dtype=dtype
              ).asnumpy()
              verify_generator(
                  generator=generator_mx,
                  buckets=buckets,
                  probs=probs,
                  nrepeat=100,
              )
              # Scipy uses alpha = 0.01 for testing discrete distribution generator but we are using default alpha=0.05 (higher threshold ensures robustness)
              # Refer - https://github.com/scipy/scipy/blob/9f12af697763fb5f9767d5cb1280ce62456a3974/scipy/stats/tests/test_discrete_basic.py#L45
              generator_mx_same_seed = lambda x: np.concatenate(
                  [
                      mx.nd.random.randint(
                          low, high, shape=x // 10, ctx=ctx, dtype=dtype
                      ).asnumpy()
                      for _ in range(10)
                  ]
              )
              verify_generator(
                  generator=generator_mx_same_seed,
                  buckets=buckets,
                  probs=probs,
                  nrepeat=100,
              )
  
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 28 for calling a global function with example usage: test_randint_generator() without return types