code: def conv_dataset_command(args):
      if type(args.num_of_threads) == int and args.num_of_threads <= 0:
          print(
              "The numbers of threads [{}] must be positive integer.".format(
                  args.num_of_threads
              )
          )
          return False
  
      if os.path.exists(args.destination):
          if not args.force:
              print(
                  "File or directory [{}] is exists use `-F` option to overwrite it.".format(
                      args.destination
                  )
              )
              return False
          elif os.path.isdir(args.destination):
              print(
                  "Overwrite destination [{}].".format(args.destination)
              )
              shutil.rmtree(args.destination, ignore_errors=True)
              os.mkdir(args.destination)
          else:
              print(
                  "Cannot overwrite file [{}] please delete it.".format(
                      args.destination
                  )
              )
              return False
      else:
          os.mkdir(args.destination)
  
      _, ext = os.path.splitext(args.source)
      if ext.lower() == ".csv":
          if os.path.exists(args.source):
              cc = CreateCache(
                  args.source,
                  shuffle=args.shuffle,
                  num_of_threads=args.num_of_threads,
              )
              print("Number of Data: {}".format(cc._size))
              print("Shuffle:        {}".format(cc._shuffle))
              print("Normalize:      {}".format(args.normalize))
              cc.create(args.destination, normalize=args.normalize)
          else:
              with CsvDataSource(
                  args.source,
                  shuffle=args.shuffle,
                  normalize=args.normalize,
              ) as source:
                  _convert(args, source)
  
      elif ext.lower() == ".cache":
          with CacheDataSource(
              args.source,
              shuffle=args.shuffle,
              normalize=args.normalize,
          ) as source:
              _convert(args, source)
      else:
          print(
              "Command `conv_dataset` only supports CSV or CACHE as source."
          )
      return True
  
file_path: nnabla/python/src/nnabla/utils/cli/conv_dataset.py
imports: import os
  import shutil
  from nnabla.config import nnabla_config
  from nnabla.utils.create_cache import CreateCache
  from nnabla.utils.data_source import DataSourceWithFileCache
  from nnabla.utils.data_source_implements import CacheDataSource, CsvDataSource
  from tqdm import tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: conv_dataset_command(args) and returns: True, False, False, False