code: def find_train_dev_test_files(
      data_folder, dev_file, test_file, train_file, autofind_splits=True
  ):
      if isinstance(data_folder, str):
          data_folder: Path = Path(data_folder)
  
      if train_file is not None:
          train_file = data_folder / train_file
      if test_file is not None:
          test_file = data_folder / test_file
      if dev_file is not None:
          dev_file = data_folder / dev_file
  
      suffixes_to_ignore = {".gz", ".swp"}
  
      # automatically identify train / test / dev files
      if train_file is None and autofind_splits:
          for file in data_folder.iterdir():
              file_name = file.name
              if not suffixes_to_ignore.isdisjoint(file.suffixes):
                  continue
              if "train" in file_name and "54019" not in file_name:
                  train_file = file
              if "dev" in file_name:
                  dev_file = file
              if "testa" in file_name:
                  dev_file = file
              if "testb" in file_name:
                  test_file = file
  
          # if no test file is found, take any file with 'test' in name
          if test_file is None and autofind_splits:
              for file in data_folder.iterdir():
                  file_name = file.name
                  if not suffixes_to_ignore.isdisjoint(file.suffixes):
                      continue
                  if "test" in file_name:
                      test_file = file
  
      log.info(f"Reading data from {data_folder}")
      log.info(f"Train: {train_file}")
      log.info(f"Dev: {dev_file}")
      log.info(f"Test: {test_file}")
  
      return dev_file, test_file, train_file
  
imports: import logging
  from abc import abstractmethod
  from pathlib import Path
  from typing import Generic, List, Optional, Union
  import torch.utils.data.dataloader
  from deprecated.sphinx import deprecated
  from flair.data import DT, FlairDataset, Sentence, Tokenizer
  from flair.tokenization import SegtokTokenizer, SpaceTokenizer
label_desc: Use image node_id 1 for calling a global function with example usage: find_train_dev_test_files(data_folder, dev_file, test_file, train_file, autofind_splits) and returns: dev_file,  test_file,  train_file