class_docstr: Open Retrieval Question Answering evaluation using Google NQ dataset.
class_docstr_tok: ["Open","Retrieval","Question","Answering","evaluation","using","Google","NQ","dataset","."]
code: def __getitem__(self, idx):
      raw_sample = self.samples[idx]
  
      (
          ques_tokens,
          tokentypes_enc,
          num_tokens_ques,
      ) = build_tokens_types_paddings_from_text(
          raw_sample["question"], self.tokenizer, self.max_seq_length
      )
  
      sample = build_sample(
          ques_tokens,
          tokentypes_enc,
          num_tokens_ques,
          raw_sample["answers"],
      )
      return sample
  
imports: from abc import ABC
  import csv
  from collections import OrderedDict
  import numpy
  import torch
  from torch.utils.data import DataLoader
  from torch.utils.data import Dataset, BatchSampler
  from megatron import print_rank_0, get_args, get_tokenizer
  from megatron.data.biencoder_dataset_utils import make_attention_mask
label_desc: Use image node_id 3 for calling the NQDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: sample