code: def generate_model_archive(
      config: Optional[ModelArchiverConfig] = None,
  ):
      """
      Generate a model archive file
      :return:
      """
  
      logging.basicConfig(format="%(levelname)s - %(message)s")
      if config is None:
          config = ArgParser.export_model_args_parser()
      manifest = ModelExportUtils.generate_manifest_json(config)
      package_model(config, manifest=manifest)
  
file_path: serve/model-archiver/model_archiver/model_packaging.py
imports: import logging
  import shutil
  from typing import Optional
  from model_archiver.arg_parser import ArgParser
  from model_archiver.model_archiver_config import ModelArchiverConfig
  from model_archiver.model_archiver_error import ModelArchiverError
  from model_archiver.model_packaging_utils import ModelExportUtils
label_desc: Use image node_id 2 for calling a global function with example usage: generate_model_archive(config) without return types