class_docstr: Dataset for RETRO model.
  
  It constructs single data record from the training/retrieval indexed retrieval dataset and knn index file.
  The KNN index file maps data chunk id to K-nearest neighbors in the the retrieval dataset chunk ids.
  First, it loads a long sequence (2048) from training dataset. Then for each chunk in the sequence, it finds the kNN 
  chunks from the retrieval dataset using the KNN index. Lastly, compute the masks based on pad id.
class_docstr_tok: ["Dataset","for","RETRO","model",".","It","constructs","single","data","record","from","the","training\/retrieval","indexed","retrieval","dataset","and","knn","index","file",".","The","KNN","index","file","maps","data","chunk","id","to","K-nearest","neighbors","in","the","the","retrieval","dataset","chunk","ids",".","First",",","it","loads","a","long","sequence","(","2048",")","from","training","dataset",".","Then","for","each","chunk","in","the","sequence",",","it","finds","the","kNN","chunks","from","the","retrieval","dataset","using","the","KNN","index",".","Lastly",",","compute","the","masks","based","on","pad","id","."]
code: def __len__(self):
      # -1 is due to data structure used to retieve the index:
      #    sample i --> [sample_idx[i], sample_idx[i+1])
      return self.sample_idx.shape[0] - 1
  
imports: import os
  from typing import List
  import numpy
  import torch
  from nemo.collections.nlp.data.language_modeling.megatron.base_dataset_utils import get_datasets_weights_and_num_samples, get_train_valid_test_split_
  from nemo.collections.nlp.data.language_modeling.megatron.blendable_dataset import BlendableDataset
  from nemo.collections.nlp.data.language_modeling.megatron.gpt_dataset import _build_index_mappings, get_indexed_dataset_
  from nemo.collections.nlp.data.language_modeling.megatron.indexed_retrieval_dataset import KNNIndex, MMapRetrievalIndexedDataset
  from nemo.core import Dataset
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling the RETRODataset obj's underlying member method code with example usage: obj.__len__() and returns: unknown