code: def random_shape(rng, ndim: int, max_size: int):
      if ndim == 0:
          return []
      max_size = int(max_size ** (1 / ndim))
      return list(rng.integers(1, max_size, [ndim]))
  
file_path: DALI/dali/test/python/operator_1/test_cast.py
imports: import numpy
  import nvidia.dali.fn
  import nvidia.dali.types
  from nose.tools import nottest
  from nvidia.dali import pipeline_def
  from test_utils import np_type_to_dali
  import itertools
  from nose2.tools import params
label_desc: Use image node_id 2 for calling a global function with example usage: random_shape(rng, ndim, max_size) and returns: list, list