code: def validate_corpus_exists(
      corpus: pytorch_translate_data.ParallelCorpusConfig,
      split: str,
      is_npz: bool = True,
  ):
      """
      Makes sure that the files in the `corpus` are valid files. `split` is used
      for logging.
      """
      if is_npz:
          if not PathManager.exists(corpus.source.data_file):
              raise ValueError(
                  f"{corpus.source.data_file} for {split} not found!"
              )
          if not PathManager.exists(corpus.target.data_file):
              raise ValueError(
                  f"{corpus.target.data_file} for {split} not found!"
              )
      else:
          validate_fairseq_dataset_exists(corpus.source.data_file)
          validate_fairseq_dataset_exists(corpus.target.data_file)
  
imports: from typing import Optional
  from fvcore.common.file_io import PathManager
  from pytorch_translate.data import char_data, data, weighted_data
label_desc: Use image node_id 4 for calling a global function with example usage: validate_corpus_exists(corpus, split, is_npz) without return types