code: def convert_checkpoint(
      input_path: str, output_path: str, output_type: str
  ):
      assert g_pathmgr.exists(
          input_path
      ), f"Checkpoint input path: {input_path} not found."
  
      # Make the output directory if it doesn't exist.
      makedir(os.path.split(output_path)[0])
  
      setup_logging(__name__)
      if output_type == CheckpointType.consolidated.name:
          CheckpointFormatConverter.sharded_to_consolidated_checkpoint(
              input_path, output_path
          )
      elif output_type == CheckpointType.sliced.name:
          CheckpointFormatConverter.to_sliced_checkpoint(
              input_path, output_path
          )
      shutdown_logging()
  
file_path: vissl/extra_scripts/convert_sharded_checkpoint.py
imports: import argparse
  import enum
  import os
  from iopath.common.file_io import g_pathmgr
  from vissl.utils.checkpoint import CheckpointFormatConverter
  from vissl.utils.env import setup_path_manager
  from vissl.utils.io import makedir
  from vissl.utils.logger import setup_logging, shutdown_logging
label_desc: Use image node_id 1 for calling a global function with example usage: convert_checkpoint(input_path, output_path, output_type) without return types