code: def get_data_files(split, args):
      data_dir = f"{args.data_source_dir}/ImageSets/Main"
      assert g_pathmgr.exists(
          data_dir
      ), "Data: {} doesn't exist".format(data_dir)
      test_data_files = glob(os.path.join(data_dir, "*_test.txt"))
      test_data_files = validate_files(test_data_files)
      if args.separate_partitions > 0:
          train_data_files = glob(os.path.join(data_dir, "*_train.txt"))
          val_data_files = glob(os.path.join(data_dir, "*_val.txt"))
          train_data_files = validate_files(train_data_files)
          val_data_files = validate_files(val_data_files)
          assert len(train_data_files) == len(val_data_files)
          if split == "train":
              data_files = train_data_files
          elif split == "test":
              data_files = test_data_files
          else:
              data_files = val_data_files
      else:
          train_data_files = glob(
              os.path.join(data_dir, "*_trainval.txt")
          )
          if len(test_data_files) == 0:
              # For VOC2012 dataset, we have trainval, val and train data.
              train_data_files = glob(
                  os.path.join(data_dir, "*_train.txt")
              )
              test_data_files = glob(
                  os.path.join(data_dir, "*_val.txt")
              )
          test_data_files = validate_files(test_data_files)
          train_data_files = validate_files(train_data_files)
          data_files = (
              train_data_files
              if (split == "train")
              else test_data_files
          )
      assert len(train_data_files) == len(
          test_data_files
      ), "Missing classes"
      return data_files
  
file_path: vissl/extra_scripts/datasets/create_voc_data_files.py
imports: import argparse
  import logging
  import os
  import sys
  from glob import glob
  import numpy
  from iopath.common.file_io import g_pathmgr
label_desc: Use image node_id 2 for calling a global function with example usage: get_data_files(split, args) and returns: data_files