code: def get_data_files(split, dataset_config):
      """
      Get the path to the dataset (images and labels).
          1. If the user has explicitly specified the data_sources, we simply
             use those and don't do lookup in the datasets registered with VISSL
             from the dataset catalog.
          2. If the user hasn't specified the path, look for the dataset in
             the datasets catalog registered with VISSL. For a given list of datasets
             and a given partition (train/test), we first verify that we have the
             dataset and the correct source as specified by the user.
             Then for each dataset in the list, we get the data path (make sure it
             exists, sources match). For the label file, the file is optional.
  
      Once we have the dataset original paths, we replace the path with the local paths
      if the data was copied to local disk.
      """
      assert len(dataset_config[split].DATASET_NAMES) == len(
          dataset_config[split].DATA_SOURCES
      ), "len(data_sources) != len(dataset_names)"
      if len(dataset_config[split].DATA_PATHS) > 0:
          assert len(dataset_config[split].DATA_SOURCES) == len(
              dataset_config[split].DATA_PATHS
          ), "len(data_sources) != len(data_paths)"
      data_files, label_files = [], []
      data_names = dataset_config[split].DATASET_NAMES
      data_sources = dataset_config[split].DATA_SOURCES
      data_split = "train" if split == "TRAIN" else "val"
      for idx in range(len(data_sources)):
          # if there are synthetic data sources, we set the filepaths as none
          if data_sources[idx] == "synthetic":
              data_files.append("")
              continue
          # if user has specified the data path explicitly, we use it
          elif len(dataset_config[split].DATA_PATHS) > 0:
              data_files.append(dataset_config[split].DATA_PATHS[idx])
          # otherwise retrieve from the cataloag based on the dataset name
          else:
              data_info = VisslDatasetCatalog.get(data_names[idx])
              assert (
                  len(data_info[data_split]) > 0
              ), f"data paths list for split: { data_split } is empty"
              check_data_exists(
                  data_info[data_split][0]
              ), f"Some data files dont exist: {data_info[data_split][0]}"
              data_files.append(data_info[data_split][0])
          # labels are optional and hence we append if we find them
          if len(dataset_config[split].LABEL_PATHS) > 0:
              if check_data_exists(
                  dataset_config[split].LABEL_PATHS[idx]
              ):
                  label_files.append(
                      dataset_config[split].LABEL_PATHS[idx]
                  )
          else:
              label_data_info = VisslDatasetCatalog.get(data_names[idx])
              if check_data_exists(label_data_info[data_split][1]):
                  label_files.append(label_data_info[data_split][1])
  
      output = [data_files, label_files]
      if dataset_config[split].COPY_TO_LOCAL_DISK:
          dest_dir = dataset_config[split]["COPY_DESTINATION_DIR"]
          local_data_files = get_local_output_filepaths(
              data_files, dest_dir
          )
          local_label_files = get_local_output_filepaths(
              label_files, dest_dir
          )
          output = [local_data_files, local_label_files]
      return output
  
imports: import json
  import logging
  import os
  from typing import List
  import numpy
  from iopath.common.file_io import g_pathmgr
  from vissl.data.datasets import get_coco_imgs_labels_info, get_voc_images_labels_info
  from vissl.utils.misc import get_json_data_catalog_file
  from vissl.utils.slurm import get_slurm_dir
label_desc: Use image node_id 7 for calling a global function with example usage: get_data_files(split, dataset_config) and returns: output