code: def load_folder_files(folder_path, recursive=True):
      
      if isinstance(folder_path, (list, set)):
          files = []
          for path in set(folder_path):
              files.extend(load_folder_files(path, recursive))
  
          return files
  
      if not os.path.exists(folder_path):
          return []
  
      file_list = []
  
      for dirpath, dirnames, filenames in os.walk(folder_path):
          filenames_list = []
  
          for filename in filenames:
              if not filename.endswith(('.yml', '.yaml', '.json')):
                  continue
  
              filenames_list.append(filename)
  
          for filename in filenames_list:
              file_path = os.path.join(dirpath, filename)
              file_list.append(file_path)
  
          if not recursive:
              break
  
      return file_list
docs: load folder path, return all files endswith yml/yaml/json in list.
  
      Args:
          folder_path (str): specified folder path to load
          recursive (bool): load files recursively if True
  
      Returns:
          list: files endswith yml/yaml/json