code: def split_exists(split, src, tgt, lang, data_path, dataset_impl):
      filename = os.path.join(
          data_path, "{}.{}-{}.{}".format(split, src, tgt, lang)
      )
      return indexed_dataset.dataset_exists(filename, impl=dataset_impl)
  
imports: import itertools
  import json
  import logging
  import os
  import shutil
  import subprocess
  from pathlib import Path
  from argparse import Namespace
  import numpy
  from fairseq import metrics, options, utils
  from fairseq.data import AppendTokenDataset, ConcatDataset, LanguagePairDataset, PrependTokenDataset, StripTokenDataset, TruncateDataset, data_utils, encoders, indexed_dataset
  import torch.distributed
  from fairseq.tasks import LegacyFairseqTask, register_task
  from fairseq.tasks.translation import TranslationTask
label_desc: Use image node_id 2 for calling a global function with example usage: split_exists(split, src, tgt, lang, data_path, dataset_impl) and returns: indexed_dataset