code: def create_test_data(request):
      test_data_dir = "loader_test_data_dir"
  
      # create files
      created_files = []
      for dir_index in range(1, 3):
          # create subdir
          dir_name = abspath(join(test_data_dir, f"subdir{dir_index}"))
          pathlib.Path(dir_name).mkdir(parents=True, exist_ok=True)
          for file_index in range(1, 3):
              # create file in subdir
              file_name = join(
                  dir_name, f"{dir_index}_subdir_{file_index}_file.txt"
              )
  
              # fill in file
              with open(file_name, "w") as file:
                  file.write(f"{basename(file_name)} content")
              created_files.append(file_name)
  
      request.addfinalizer(remove_test_data)
  
file_path: FEDOT/test/unit/data/test_file_loader.py
imports: import os
  import pathlib
  import shutil
  from os.path import abspath, basename, join
  import pytest
  from fedot.core.data.load_data import TextBatchLoader
label_desc: Use image node_id 1 for calling a global function with example usage: create_test_data(request) without return types