code: def _get_files(fs, src: Path, dst: Path, overwrite: bool = True):
      dst = dst.resolve()
      if fs.isdir(src):
          if isinstance(fs, LocalFileSystem):
              dst = dst.resolve()
              if fs.exists(dst):
                  if overwrite:
                      fs.rm(str(dst), recursive=True)
                  else:
                      raise FileExistsError(
                          f"The file {dst} was found. Add get(..., overwrite=True) to replace it."
                      )
  
              shutil.copytree(src, dst)
          else:
              glob = f"{str(src)}/**"
              fs.get(glob, str(dst), recursive=False)
      else:
          fs.get(str(src), str(dst), recursive=False)
  
file_path: pytorch-lightning/src/lightning/app/storage/filesystem.py
imports: import os
  import shutil
  from pathlib import Path
  from typing import Callable, List
  from fsspec.implementations.local import LocalFileSystem
  from lightning.app.storage.copier import _copy_files
  from lightning.app.storage.path import _filesystem, _shared_storage_path
label_desc: Use image node_id 1 for calling a global function with example usage: _get_files(fs, src, dst, overwrite) without return types