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: Function which parses passages (documents) in npz format.
  After pre-processing and tokenization, the dataset will be saved
  as numpy matrix, i_th entry of which corresponds to i_th passage (document)
  and has the following form:
  [n, token_1, ..., token_n, 0, ..., 0]
  where n is the passage length (in tokens) and 0s correspond to pad tokens.
  
  Args:
      file: str, path to file with passages (documents)
      max_seq_length: maximum length of sequence in tokens
docstr_tok: ["Function","which","parses","passages","(","documents",")","in","npz","format",".","After","pre-processing","and","tokenization",",","the","dataset","will","be","saved","as","numpy","matrix",",","i_th","entry","of","which","corresponds","to","i_th","passage","(","document",")","and","has","the","following","form",":","[","n",",","token_1",",","...",",","token_n",",","0",",","...",",","0","]","where","n","is","the","passage","length","(","in","tokens",")","and","0s","correspond","to","pad","tokens",".","Args",":","file",":","str",",","path","to","file","with","passages","(","documents",")","max_seq_length",":","maximum","length","of","sequence","in","tokens"]
code: def parse_npz(self, file, max_seq_length):
      """
      Function which parses passages (documents) in npz format.
      After pre-processing and tokenization, the dataset will be saved
      as numpy matrix, i_th entry of which corresponds to i_th passage (document)
      and has the following form:
      [n, token_1, ..., token_n, 0, ..., 0]
      where n is the passage length (in tokens) and 0s correspond to pad tokens.
  
      Args:
          file: str, path to file with passages (documents)
          max_seq_length: maximum length of sequence in tokens
      """
      cached_collection = file + ".npz"
      if os.path.isfile(cached_collection):
          dataset_npz = np.load(cached_collection)["data"]
      else:
          dataset_dict = self.tokenize_dataset(file, max_seq_length)
          dataset_npz = np.zeros(
              (len(dataset_dict), max_seq_length + 1)
          )
          for key in dataset_dict:
              dataset_npz[key][0] = len(dataset_dict[key])
              dataset_npz[key][
                  1 : len(dataset_dict[key]) + 1
              ] = dataset_dict[key]
          np.savez(cached_collection, data=dataset_npz)
      return dataset_npz
  
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 2 for calling the BaseInformationRetrievalDataset obj's underlying member method code with example usage: obj.parse_npz(file, max_seq_length) and returns: dataset_npz