code: def test_convert_model_checkpoints():
      with tempfile.TemporaryDirectory() as work_dir:
          model_dir = os.path.join(work_dir, "model")
          shutil.copytree(
              os.path.join("test", "data", "deepspeed", "model"),
              model_dir,
              symlinks=True,
          )
          # Convert
          convert_model_checkpoints(
              model_dirname=model_dir, keep_deepspeed=False
          )
          # Check
          for fname in os.listdir(model_dir):
              if (
                  fname.startswith(C.PARAMS_PREFIX)
                  and fname[len(C.PARAMS_PREFIX) :].isdigit()
              ):
                  converted_params = torch.load(
                      os.path.join(model_dir, fname)
                  )
                  reference_params = torch.load(
                      os.path.join(
                          "test",
                          "data",
                          "deepspeed",
                          "converted",
                          fname,
                      )
                  )
                  for key in (
                      converted_params.keys() | reference_params.keys()
                  ):
                      assert torch.allclose(
                          converted_params[key], reference_params[key]
                      )
  
imports: import os
  import shutil
  import tempfile
  import pytest
  import torch
  import sockeye.constants
  from sockeye.convert_deepspeed import convert_model_checkpoints
label_desc: Use image node_id 1 for calling a global function with example usage: test_convert_model_checkpoints() without return types