code: def init_indexed_dataset_infos():
      """Gather meta-info about each indexed dataset.
  
      The returned info array allows for easy access to the configuration, and
      helps remove ambiguity.
      """
  
      args = get_retro_args()
  
      assert (
          len(args.data_path) % 2 == 0
      ), "currently, only blended dataset is supported."
  
      # Dataset infos.
      infos = []
      for i in range(0, len(args.data_path), 2):
          ratio = float(args.data_path[i])
          prefix = args.data_path[i + 1]
          path = prefix + ".bin"
          name = os.path.basename(prefix)
          assert os.path.exists(path), "couldn't find '%s'." % path
          infos.append(
              {
                  "ratio": ratio,
                  "prefix": prefix,
                  "path": path,
                  "name": name,
                  "db_dir": get_individual_db_dir(name),
                  "dataset": MMapIndexedDataset(prefix),
              }
          )
  
      return infos
  
imports: from collections import defaultdict
  from concurrent.futures import as_completed, ProcessPoolExecutor
  from functools import reduce
  import glob
  import json
  import numpy
  import os
  from pathlib import Path
  import threading
  import torch
  from tqdm import tqdm
  import types
  from megatron import get_retro_args, print_rank_0
  from megatron.core.datasets.indexed_dataset import MMapIndexedDataset
  from megatron.tokenizer.tokenizer import _BertWordPieceTokenizer, _GPT2BPETokenizer
  from tools.bert_embedding.utils import get_missing_blocks_by_rank
  from tools.retro.external_libs import h5py
  from tools.retro.utils import get_gpt_tokenizer, get_bert_tokenizer
  from .utils import get_indexed_dataset_infos, get_indexed_dataset_infos_path, get_individual_db_dir, get_individual_chunk_db, get_individual_doc_offsets, get_merged_dataset, get_merged_db_path_map, save_indexed_dataset_infos
label_desc: Use image node_id 1 for calling a global function with example usage: init_indexed_dataset_infos() and returns: infos