code: def upgrade():
      config = Config()
      is_cloud = config.get("cloud", False)
      if is_cloud is True:
          return
  
      storage_path = Path(config.paths["storage"])
      for item in storage_path.iterdir():
          if item.is_file() and item.name.startswith("predictor_"):
              original_name = item.name
              temp_file_path = item.parent / f"{original_name}_temp"
              item.replace(temp_file_path)
              item.mkdir(exist_ok=True)
              temp_file_path.replace(item / original_name)
  
      root_path = Path(config.paths["root"])
      if (root_path / "datasources").is_dir():
          shutil.rmtree(root_path / "datasources")
      if (root_path / "integrations").is_dir():
          shutil.rmtree(root_path / "integrations")
      if (root_path / "predictors").is_dir():
          shutil.rmtree(root_path / "predictors")
  
imports: from pathlib import Path
  import shutil
  from mindsdb.utilities.config import Config
label_desc: Use image node_id 1 for calling a global function with example usage: upgrade() without return types