code: def create_checkpoints_json(model_path, checkpoints_json):
      checkpoint_files = file_list = [
          str(entry)
          for entry in Path(model_path).rglob("*.[bp][it][n]")
          if entry.is_file()
      ]
      data = {
          "type": "ds_model",
          "checkpoints": checkpoint_files,
          "version": 1.0,
      }
      print(f"Creating deepspeed checkpoint file {checkpoints_json}")
      json.dump(data, open(checkpoints_json, "w"))
  
file_path: serve/ts/handler_utils/distributed/deepspeed.py
imports: import json
  import logging
  import os
  from pathlib import Path
  import deepspeed
  from ts.context import Context
label_desc: Use image node_id 1 for calling a global function with example usage: create_checkpoints_json(model_path, checkpoints_json) without return types