code: def load_meta_data(datasets, eval_split=True):
      meta_data_train_all = []
      meta_data_eval_all = [] if eval_split else None
      for dataset in datasets:
          name = dataset["name"]
          root_path = dataset["path"]
          meta_file_train = dataset["meta_file_train"]
          meta_file_val = dataset["meta_file_val"]
          # setup the right data processor
          preprocessor = get_preprocessor_by_name(name)
          # load train set
          meta_data_train = preprocessor(root_path, meta_file_train)
          print(
              f" | > Found {len(meta_data_train)} files in {Path(root_path).resolve()}"
          )
          # load evaluation split if set
          if eval_split:
              if meta_file_val is None:
                  meta_data_eval, meta_data_train = split_dataset(
                      meta_data_train
                  )
              else:
                  meta_data_eval = preprocessor(
                      root_path, meta_file_val
                  )
              meta_data_eval_all += meta_data_eval
          meta_data_train_all += meta_data_train
          # load attention masks for duration predictor training
          if "meta_file_attn_mask" in dataset:
              meta_data = dict(
                  load_attention_mask_meta_data(
                      dataset["meta_file_attn_mask"]
                  )
              )
              for idx, ins in enumerate(meta_data_train_all):
                  attn_file = meta_data[ins[1]].strip()
                  meta_data_train_all[idx].append(attn_file)
              if meta_data_eval_all is not None:
                  for idx, ins in enumerate(meta_data_eval_all):
                      attn_file = meta_data[ins[1]].strip()
                      meta_data_eval_all[idx].append(attn_file)
      return meta_data_train_all, meta_data_eval_all
  
imports: import os
  from glob import glob
  import re
  import sys
  from pathlib import Path
  from tqdm import tqdm
  from TTS.tts.utils.generic_utils import split_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: load_meta_data(datasets, eval_split) and returns: meta_data_train_all,  meta_data_eval_all