code: def subfiles(
      folder: str,
      join: bool = True,
      prefix: str = None,
      suffix: str = None,
      sort: bool = True,
  ) -> List[str]:
      if join:
          l = os.path.join
      else:
          l = lambda x, y: y
      res = [
          l(folder, i)
          for i in os.listdir(folder)
          if os.path.isfile(os.path.join(folder, i))
          and (prefix is None or i.startswith(prefix))
          and (suffix is None or i.endswith(suffix))
      ]
      if sort:
          res.sort()
      return res
  
imports: import os
  import pickle
  import glob
  import json
  import numpy
  from multiprocessing import Pool
  from collections import OrderedDict
  from sklearn.model_selection import KFold
  from typing import List
  from medicalseg.datasets import MedicalDataset
  from medicalseg.cvlibs import manager
  from nnunet.transforms import get_moreDA_augmentation, default_2D_augmentation_params, default_3D_augmentation_params
  from nnunet.transforms import rotate_coords_3d, rotate_coords_2d, NumpyToTensor
  from .dataloader import DataLoader2D, DataLoader3D
  from tools.preprocess_utils import verify_dataset_integrity, convert_to_decathlon, crop, ExperimentPlanner2D_v21, ExperimentPlanner3D_v21, DatasetAnalyzer
label_desc: Use image node_id 2 for calling a global function with example usage: subfiles(folder, join, prefix, suffix, sort) and returns: res