code: def save_icevision_checkpoint(
      model,
      filename,
      optimizer=None,
      meta=None,
      model_name=None,
      backbone_name=None,
      classes=None,
      img_size=None,
  ):
      """Save checkpoint to file.
  
      The checkpoint will have 3 fields: ``meta``, ``state_dict`` and
      ``optimizer``. By default ``meta`` will contain version and time info.
  
      Args:
          model (Module): Module whose params are to be saved.
          filename (str): Checkpoint filename.
          optimizer (:obj:`Optimizer`, optional): Optimizer to be saved.
          meta (dict, optional): Metadata to be saved in checkpoint.
  
      Examples:
          >>> save_icevision_checkpoint(model_saved,
                          model_name='mmdet.retinanet',
                          backbone_name='resnet50_fpn_1x',
                          class_map =  class_map,
                          img_size=img_size,
                          filename=checkpoint_path,
                          meta={'icevision_version': '0.9.1'})
  
      """
  
      if meta is None:
          meta = {}
      elif not isinstance(meta, dict):
          raise TypeError(
              f"meta must be a dict or None, but got {type(meta)}"
          )
  
      if classes:
          meta.update(classes=classes)
  
      if model_name:
          meta.update(model_name=model_name)
  
      if img_size:
          meta.update(img_size=img_size)
  
      if backbone_name:
          meta.update(backbone_name=backbone_name)
  
      save_checkpoint(model, filename, optimizer=optimizer, meta=meta)
  
imports: from icevision.imports import *
  from icevision.core import *
  from icevision import models
  from mmcv.runner import load_checkpoint, save_checkpoint, _load_checkpoint, load_state_dict
label_desc: Use image node_id 1 for calling a global function with example usage: save_icevision_checkpoint(model, filename, optimizer, meta, model_name, backbone_name, classes, img_size) without return types