code: def mk_dataset(n, mnist, max_digits, canvas_size):
      x = []
      y = []
      for _ in range(n):
          num_digits = np.random.randint(max_digits + 1)
          canvas, labels = sample_multi(num_digits, canvas_size, mnist)
          x.append(canvas)
          y.append(labels)
      return np.array(x, dtype=np.uint8), np.array(y, dtype=object)
  
file_path: pyro/pyro/contrib/examples/multi_mnist.py
imports: import os
  import numpy
  from PIL import Image
  from pyro.contrib.examples.util import get_data_loader
label_desc: Use image node_id 4 for calling a global function with example usage: mk_dataset(n, mnist, max_digits, canvas_size) and returns: np,  np