code: def remove_checkpoints(model_path):
      subfolders = glob.glob(os.path.join(model_path, "*/"))
      for subfolder in subfolders:
          shutil.rmtree(subfolder)
      try:
          os.remove(os.path.join(model_path, "emissions.csv"))
      except OSError:
          pass
  
imports: import glob
  import json
  import os
  import re
  import shutil
  import subprocess
  import traceback
  from typing import Dict, Optional
  import requests
  from huggingface_hub import HfApi, HfFolder
  from huggingface_hub.repository import Repository
  from transformers import AutoConfig
  from autotrain import config, logger
  from autotrain.tasks import TASKS
label_desc: Use image node_id 17 for calling a global function with example usage: remove_checkpoints(model_path) without return types