code: def main(args: Dict, silent: bool = False):
      if args.get("debug"):
          options["logging.level"] = DEBUG
  
      path = Path(args.get("model"))
      mdl = load_model(path, args.get("skip_warnings", False))
      est = Estimator(mdl)
  
      if args.get("language"):
          est.language = args.get("language")
  
      if args.get("template"):
          est.template = args.get("template")
  
      directory = args.get("directory")
      if not directory:
          directory = Path.cwd()
      paths = est.save(directory=directory)
  
      if not isinstance(paths, tuple):
          paths = (paths,)
  
      out = ["Saved files:"]
      for p in paths:
          out.append("  " + str(p))
      out = "\n".join(out)
  
      if not silent:
          print(out)
  
      return out
  
file_path: sklearn-porter/sklearn_porter/cli/command/save.py
imports: from argparse import RawTextHelpFormatter
  from logging import DEBUG
  from pathlib import Path
  from textwrap import dedent
  from typing import Dict
  from sklearn_porter import Estimator, options
  from sklearn_porter.cli.common import arg_debug, arg_help, arg_skip_warnings
  from sklearn_porter.cli.utils import load_model
  from sklearn_porter.language import LANGUAGES
label_desc: Use image node_id 2 for calling a global function with example usage: main(args, silent) and returns: out