code: def save_params(
      net, logger, best_map, current_map, epoch, save_interval, prefix
  ):
      current_map = float(current_map)
      if current_map > best_map[0]:
          logger.info(
              "[Epoch {}] mAP {} higher than current best {} saving to {}".format(
                  epoch,
                  current_map,
                  best_map,
                  "{:s}_best.params".format(prefix),
              )
          )
          best_map[0] = current_map
          net.save_parameters("{:s}_best.params".format(prefix))
          with open(prefix + "_best_map.log", "a") as f:
              f.write("{:04d}:\t{:.4f}\n".format(epoch, current_map))
      if save_interval and (epoch + 1) % save_interval == 0:
          logger.info(
              "[Epoch {}] Saving parameters to {}".format(
                  epoch,
                  "{:s}_{:04d}_{:.4f}.params".format(
                      prefix, epoch, current_map
                  ),
              )
          )
          net.save_parameters(
              "{:s}_{:04d}_{:.4f}.params".format(
                  prefix, epoch, current_map
              )
          )
  
imports: import argparse
  import os
  import logging
  import time
  import gluoncv
  import mxnet
  import numpy
  from data import *
  from gluoncv import data, utils
  from gluoncv.data.batchify import Append, FasterRCNNTrainBatchify, Tuple
  from gluoncv.data.transforms.presets.rcnn import FasterRCNNDefaultTrainTransform, FasterRCNNDefaultValTransform
  from gluoncv.model_zoo import get_model
  from gluoncv.utils.metrics.coco_detection import COCODetectionMetric
  from gluoncv.utils.metrics.rcnn import RCNNAccMetric, RCNNL1LossMetric, RPNAccMetric, RPNL1LossMetric
  from gluoncv.utils.metrics.voc_detection import VOC07MApMetric
  from gluoncv.utils.parallel import Parallel, Parallelizable
  from model import faster_rcnn_resnet101_v1d_custom, faster_rcnn_resnet50_v1b_custom
  from mxnet import autograd, gluon
  from mxnet.contrib import amp
label_desc: Use image node_id 4 for calling a global function with example usage: save_params(net, logger, best_map, current_map, epoch, save_interval, prefix) without return types