code: def clean_unlinked_process_marks():
      """delete marks that does not have corresponded processes/threads"""
      if os.name != "posix":
          return
  
      p = Path(tempfile.gettempdir()).joinpath("mindsdb/processes/")
      if p.exists() is False:
          return
      for path in p.iterdir():
          if path.is_dir() is False:
              return
          for file in path.iterdir():
              parts = file.name.split("-")
              process_id = int(parts[0])
              thread_id = int(parts[1])
  
              try:
                  process = psutil.Process(process_id)
                  if process.status() in (
                      psutil.STATUS_ZOMBIE,
                      psutil.STATUS_DEAD,
                  ):
                      raise psutil.NoSuchProcess(process_id)
  
                  threads = process.threads()
                  try:
                      next(t for t in threads if t.id == thread_id)
                  except StopIteration:
                      logger.warning(
                          f"We have mark for process/thread {process_id}/{thread_id} but it does not exists"
                      )
                      file.unlink()
  
              except psutil.AccessDenied:
                  logger.warning(f"access to {process_id} denied")
  
                  continue
  
              except psutil.NoSuchProcess:
                  logger.warning(
                      f"We have mark for process/thread {process_id}/{thread_id} but it does not exists"
                  )
                  file.unlink()
  
file_path: mindsdb/mindsdb/utilities/fs.py
imports: import os
  import tempfile
  import threading
  import time
  from pathlib import Path
  from typing import Optional
  import psutil
  from appdirs import user_data_dir
  from mindsdb.utilities import log
label_desc: Use image node_id 10 for calling a global function with example usage: clean_unlinked_process_marks() without return types