code: def test_sample_categorical_num_outputs():
      ctx = mx.context.current_context()
      probs = [[0.125, 0.25, 0.25], [0.0625, 0.125, 0.1875]]
      out = mx.nd.random.categorical(
          data=mx.nd.array(probs, ctx=ctx), shape=10000, get_prob=False
      )
      assert isinstance(out, mx.nd.NDArray)
      out = mx.nd.random.categorical(
          data=mx.nd.array(probs, ctx=ctx), shape=10000, get_prob=True
      )
      assert isinstance(out, list)
      assert len(out) == 2
  
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 30 for calling a global function with example usage: test_sample_categorical_num_outputs() without return types