code: def _copy_algos_folder(folder, at_path):
      """
      Copies the algorithm templates folder to at_path.
      Returns a dictionary of algorithm templates.
      """
      folder = os.path.abspath(folder)
      at_path = os.path.abspath(at_path)
  
      if folder != at_path:
          if os.path.exists(at_path):
              shutil.rmtree(at_path)
          shutil.copytree(folder, at_path)
  
      algos_all = {}
      for name in os.listdir(at_path):
          if os.path.exists(
              os.path.join(folder, name, "scripts", "algo.py")
          ):
              algos_all[name] = dict(
                  _target_=f"{name}.scripts.algo.{name.capitalize()}Algo",
                  template_path=at_path,
              )
              logger.info(
                  f"Copying template: {name} -- {algos_all[name]}"
              )
      if not algos_all:
          raise ValueError(f"Unable to find any algos in {folder}")
  
      return algos_all
  
imports: from __future__ import annotations
  import importlib
  import os
  import re
  import shutil
  import subprocess
  import sys
  import time
  import warnings
  from copy import deepcopy
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Any
  from urllib.parse import urlparse
  import torch
  from monai.apps import download_and_extract
  from monai.apps.utils import get_logger
  from monai.auto3dseg.algo_gen import Algo, AlgoGen
  from monai.auto3dseg.utils import _prepare_cmd_bcprun, _prepare_cmd_default, _prepare_cmd_torchrun, _run_cmd_bcprun, _run_cmd_torchrun, algo_to_pickle
  from monai.bundle.config_parser import ConfigParser
  from monai.config import PathLike
  from monai.utils import ensure_tuple, look_up_option, run_cmd
  from monai.utils.enums import AlgoKeys
  from monai.utils.misc import MONAIEnvVars
label_desc: Use image node_id 2 for calling a global function with example usage: _copy_algos_folder(folder, at_path) and returns: algos_all