def _make_sprite_image(images, save_path):
if isinstance(images, np.ndarray):<EOL><INDENT>images = nd.array(images, dtype=images.dtype, ctx=current_context())<EOL><DEDENT>elif not isinstance(images, (NDArray, np.ndarray)):<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>'.format(str(type(images))))<EOL><DEDENT>assert isinstance(images, NDArray)<EOL>shape = images.shape<EOL>nrow = int(np.ceil(np.sqrt(shape[<NUM_LIT:0>])))<EOL>_save_image(<EOL>images, os.path.join(save_path, '<STR_LIT>'), nrow=nrow, padding=<NUM_LIT:0>, square_image=True)<EOL>
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.