code: def data_iterator_tiny_digits(
      digits, batch_size=64, shuffle=False, rng=None
  ):
      def load_func(index):
          """Loading an image and its label"""
          img = digits.images[index]
          label = digits.target[index]
          return img[None], np.array([label]).astype(np.int32)
  
      return data_iterator_simple(
          load_func,
          digits.target.shape[0],
          batch_size,
          shuffle,
          rng,
          with_file_cache=False,
      )
  
imports: from __future__ import print_function
  from nnabla.monitor import tile_images
  from nnabla.utils.data_iterator import data_iterator_simple
  import sys
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: data_iterator_tiny_digits(digits, batch_size, shuffle, rng) and returns: data_iterator_simple, img,  np