code: def construct_networks(args, images, model, num_class, test):
      try:
          pooled = model(
              images,
              force_global_pooling=1,
              use_up_to="pool",
              training=not test,
          )
      except:
          pooled = model(images, use_up_to="pool", training=not test)
  
      with nn.parameter_scope("finetuning"):
          if args.model == "VGG":
              pooled = F.relu(pooled)
  
              with nn.parameter_scope("additional_fc_1"):
                  pooled = PF.affine(pooled, 4096)
              pooled = F.relu(pooled)
              if not test:
                  pooled = F.dropout(pooled, 0.5)
  
              with nn.parameter_scope("additional_fc_2"):
                  pooled = PF.affine(pooled, 4096)
              pooled = F.relu(pooled)
              if not test:
                  pooled = F.dropout(pooled, 0.5)
  
          with nn.parameter_scope("last_fc"):
              pred = PF.affine(pooled, num_class)
  
      return pred
  
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 4 for calling a global function with example usage: construct_networks(args, images, model, num_class, test) and returns: pred