code: def main():
      parser = argparse.ArgumentParser(
          description="Convert keys to mmdet style."
      )
      parser.add_argument("src", help="src model path or url")
      # The dst path must be a full path of the new checkpoint.
      parser.add_argument("dst", help="save path")
      args = parser.parse_args()
  
      checkpoint = CheckpointLoader.load_checkpoint(
          args.src, map_location="cpu"
      )
  
      if "state_dict" in checkpoint:
          state_dict = checkpoint["state_dict"]
      else:
          state_dict = checkpoint
      torch.save(swin_converter(state_dict), args.dst)
  
      sha = subprocess.check_output(["sha256sum", args.dst]).decode()
      final_file = args.dst.replace(".pth", "") + "-{}.pth".format(
          sha[:8]
      )
      subprocess.Popen(["mv", args.dst, final_file])
      print(f"Done!!, save to {final_file}")
  
imports: import argparse
  import subprocess
  from collections import OrderedDict
  import torch
  from mmengine.runner import CheckpointLoader
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types