code: def test_make_image_grid():
      def test_2d_input():
          shape = rand_shape_2d()
          data = rand_ndarray(shape, "default")
          grid = make_image_grid(data)
          assert grid.ndim == 3
          assert grid.shape[0] == 3
          assert grid.shape[1:] == data.shape
          assert same(grid[0].asnumpy(), grid[1].asnumpy())
          assert same(grid[0].asnumpy(), grid[2].asnumpy())
          assert same(grid[0].asnumpy(), data.asnumpy())
  
      def test_3d_single_channel_input():
          shape = rand_shape_3d(dim0=1)
          data = rand_ndarray(shape, "default")
          assert data.shape[0] == 1  # single channel
          grid = make_image_grid(data)
          assert grid.ndim == 3
          assert grid.shape[0] == 3
          assert same(grid[0].asnumpy(), grid[1].asnumpy())
          assert same(grid[0].asnumpy(), grid[2].asnumpy())
          assert same(grid[0:1].asnumpy(), data.asnumpy())
  
      def test_3d_three_channel_input():
          shape = rand_shape_3d()
          shape = (3,) + shape[1:]
          data = rand_ndarray(shape, "default")
          grid = make_image_grid(data)
          assert grid.ndim == 3
          assert grid.shape[0] == 3
          assert same(grid.asnumpy(), data.asnumpy())
  
      def test_4d_single_batch_single_channel_input():
          shape = list(rand_shape_nd(4))
          shape[0] = 1
          shape[1] = 1
          shape = tuple(shape)
          data = rand_ndarray(shape, "default")
          grid = make_image_grid(data)
          assert grid.ndim == 3
          assert grid.shape[0] == 3
          assert same(grid[0].asnumpy(), grid[1].asnumpy())
          assert same(grid[0].asnumpy(), grid[2].asnumpy())
          assert same(
              grid[0].reshape(data.shape).asnumpy(), data.asnumpy()
          )
  
      def test_4d_multiple_batch_input():
          shape_list = list(rand_shape_nd(4))
          shape_list[0] = 10
          num_channels = [1, 3]
          for c in num_channels:
              shape_list[1] = c
              shape = tuple(shape_list)
              data = rand_ndarray(shape, "default")
              grid = make_image_grid(data)
              assert grid.ndim == 3
              assert grid.shape[0] == 3
  
      test_2d_input()
      test_3d_single_channel_input()
      test_3d_three_channel_input()
      test_4d_single_batch_single_channel_input()
      test_4d_multiple_batch_input()
  
imports: import shutil
  from mxboard import SummaryWriter
  from mxboard.utils import _make_metadata_tsv, make_image_grid, _make_sprite_image
  from mxboard.utils import _add_embedding_config, _save_embedding_tsv, _get_embedding_dir
  from mxboard.summary import _get_nodes_from_symbol, _net2pb
  from mxboard.proto.node_def_pb2 import NodeDef
  from mxboard.proto.attr_value_pb2 import AttrValue
  from mxboard.proto.graph_pb2 import GraphDef
  from mxboard.proto.versions_pb2 import VersionDef
  from mxnet.test_utils import *
  from mxnet.gluon import nn
  import mxnet
  from common import with_seed, setup_module
  from nose.tools import make_decorator
label_desc: Use image node_id 14 for calling a global function with example usage: test_make_image_grid() without return types