code: def main(args):
      if not args.train_csv:
          print(
              "No user-made data given. Use caltech101 dataset for finetuning."
          )
      else:
          # prepare dataset.
          assert os.path.isfile(
              args.train_csv
          ), "csv file for training not found, create dataset first."
  
      ctx = get_extension_context(
          args.context,
          device_id=args.device_id,
          type_config=args.type_config,
      )
      nn.set_default_context(ctx)
      ext = nn.ext_utils.import_extension_module(args.context)
  
      print("Use {} for fine-tuning".format(args.model))
      model_name = args.model
      if model_name == "ResNet":
          num_layers = args.res_layer
      elif model_name == "VGG":
          num_layers = args.vgg_layer
      elif model_name == "SqueezeNet":
          num_layers = args.squeeze_ver
      else:
          num_layers = ""
  
      model_module = importlib.import_module("nnabla.models.imagenet")
      MODEL = getattr(model_module, model_name)
      if model_name in ["ResNet", "VGG", "SqueezeNet"]:
          model = MODEL(num_layers)  # got model
      else:
          model = MODEL()
  
      CNN_run(args, model)
  
      return
  
file_path: nnabla/tutorial/finetuning.py
imports: import os
  import importlib
  import nnabla
  import nnabla.functions
  import nnabla.parametric_functions
  import nnabla.solvers
  import numpy
  from nnabla.ext_utils import get_extension_context
  from nnabla.monitor import Monitor, MonitorSeries, MonitorTimeElapsed
  from nnabla.utils.nnp_graph import NnpLoader, NnpNetworkPass
  from nnabla.utils.image_utils import imread
  from nnabla.utils.data_iterator import data_iterator_simple
  import argparse
label_desc: Use image node_id 6 for calling a global function with example usage: main(args) without return types