code: def generate_csv_png(filename, num_of_data, img_size):
      with create_temp_with_dir(filename) as csvfilename:
          imgdir = os.path.dirname(csvfilename)
          with open(csvfilename, "w") as f:
              f.write("x:image, y\n")
              for n in range(0, num_of_data):
                  x = numpy.identity(img_size).astype(numpy.uint8) * n
                  img_name = "image_{}.png".format(n)
                  with warnings.catch_warnings():
                      warnings.simplefilter("ignore")
                      imsave(os.path.join(imgdir, img_name), x)
                  f.write("{}, {}\n".format(img_name, n))
          yield csvfilename
  
file_path: nnabla/python/test/utils/conftest.py
imports: from __future__ import print_function
  import pytest
  from contextlib import contextmanager
  from shutil import rmtree
  import numpy
  import os
  import tempfile
  import warnings
  from nnabla.utils.image_utils import imsave
label_desc: Use image node_id 3 for calling a global function with example usage: generate_csv_png(filename, num_of_data, img_size) without return types