code: def _make_sprite_image(images, save_path):
      """Given an NDArray as a batch images, make a sprite image out of it following the rule
      defined in
      https://www.tensorflow.org/programmers_guide/embedding
      and save it in sprite.png under the path provided by the user."""
      if isinstance(images, np.ndarray):
          images = nd.array(
              images, dtype=images.dtype, ctx=current_context()
          )
      elif not isinstance(images, (NDArray, np.ndarray)):
          raise TypeError(
              "images must be an MXNet NDArray or numpy.ndarray,"
              " while received type {}".format(str(type(images)))
          )
  
      assert isinstance(images, NDArray)
      shape = images.shape
      nrow = int(np.ceil(np.sqrt(shape[0])))
      _save_image(
          images,
          os.path.join(save_path, "sprite.png"),
          nrow=nrow,
          padding=0,
          square_image=True,
      )
  
file_path: mxboard/python/mxboard/utils.py
imports: from __future__ import absolute_import
  import os
  import logging
  import numpy
  from mxnet.ndarray import NDArray, op
  from mxnet.ndarray import ndarray
  from mxnet.context import current_context
label_desc: Use image node_id 8 for calling a global function with example usage: _make_sprite_image(images, save_path) without return types