class_docstr: Base information retrieval dataset on which other datasets are built.
  
  Args:
      tokenizer: tokenizer
      max_query_length: maximum length of query in tokens
      max_passage_length: maximum length of passage in tokens
class_docstr_tok: ["Base","information","retrieval","dataset","on","which","other","datasets","are","built",".","Args",":","tokenizer",":","tokenizer","max_query_length",":","maximum","length","of","query","in","tokens","max_passage_length",":","maximum","length","of","passage","in","tokens"]
docstr: Transforms query id (Q) and a list of passages ids (P1, ..., Pk)
  into a tensor of size [k, max_length] with the following rows:
  [CLS] Q_text [SEP] Pi_text [SEP], i = 1, ..., k
docstr_tok: ["Transforms","query","id","(","Q",")","and","a","list","of","passages","ids","(","P1",",","...",",","Pk",")","into","a","tensor","of","size","[","k",",","max_length","]","with","the","following","rows",":","[","CLS","]","Q_text","[","SEP","]","Pi_text","[","SEP","]",",","i","=","1",",","...",",","k"]
code: def preprocess_bert(self, query_id, psg_ids):
      """
      Transforms query id (Q) and a list of passages ids (P1, ..., Pk)
      into a tensor of size [k, max_length] with the following rows:
      [CLS] Q_text [SEP] Pi_text [SEP], i = 1, ..., k
      """
  
      max_seq_length = (
          self.max_query_length + self.max_passage_length + 3
      )
      input_ids, input_mask, input_type_ids = [], [], []
      for psg_id in psg_ids:
          inputs = self.construct_input(
              self.queries[query_id],
              max_seq_length,
              self._psgid2tokens(psg_id),
          )
          input_ids.append(inputs[0])
          input_mask.append(inputs[1])
          input_type_ids.append(inputs[2])
  
      input_ids = np.stack(input_ids)
      input_mask = np.stack(input_mask)
      input_type_ids = np.stack(input_type_ids)
  
      return input_ids, input_mask, input_type_ids
  
imports: import multiprocessing
  import os
  import pickle
  import random
  from typing import Optional
  import numpy
  from torch.utils.data import Dataset
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
label_desc: Use image node_id 7 for calling the BaseInformationRetrievalDataset obj's underlying member method code with example usage: obj.preprocess_bert(query_id, psg_ids) and returns: input_ids,  input_mask,  input_type_ids