class_docstr: ## Dataset
  
  This is the PyTorch dataset that loads the dataset created
  by `build_dataset`.
class_docstr_tok: ["#","#","Dataset","This","is","the","PyTorch","dataset","that","loads","the","dataset","created","by","`","build_dataset","`","."]
docstr: Number of samples
docstr_tok: ["Number","of","samples"]
code: def __len__(self):
      """
      Number of samples
      """
      return len(self.samples)
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/transformers/retro/dataset.py
imports: import json
  from pathlib import Path
  import numpy
  import torch
  from torch.utils.data import Dataset
  from labml import lab, monit
  from labml_helpers.datasets.text import TextFileDataset, TextDataset
  from labml_nn.transformers.retro.database import RetroIndex
label_desc: Use image node_id 2 for calling the Dataset obj's underlying member method code with example usage: obj.__len__() and returns: len