code: def test_random_seed_setting():
      ctx = mx.context.current_context()
      seed_to_test = 1234
      num_temp_seeds = 25
      probs = [0.125, 0.25, 0.25, 0.0625, 0.125, 0.1875]
      num_samples = 100000
      for dtype in ["float16", "float32", "float64"]:
          seed = set_seed_variously(1, num_temp_seeds, seed_to_test)
          samples1 = mx.nd.random.categorical(
              data=mx.nd.array(probs, ctx=ctx, dtype=dtype),
              shape=num_samples,
          )
          seed = set_seed_variously(seed, num_temp_seeds, seed_to_test)
          samples2 = mx.nd.random.categorical(
              data=mx.nd.array(probs, ctx=ctx, dtype=dtype),
              shape=num_samples,
          )
          samples1np = samples1.asnumpy()
          set_seed_variously(seed, num_temp_seeds, seed_to_test + 1)
          samples2np = samples2.asnumpy()
          assert same(
              samples1np, samples2np
          ), "seed-setting test: `categorical` should give the same result with the same seed"
  
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 6 for calling a global function with example usage: test_random_seed_setting() without return types