code: def __len__(self) -> int:
      return self._num_samples
  
file_path: doctr/doctr/datasets/generator/base.py
imports: import random
  from typing import Any, Callable, List, Optional, Tuple, Union
  from PIL import Image, ImageDraw
  from doctr.io.image import tensor_from_pil
  from doctr.utils.fonts import get_font
  from ..datasets import AbstractDataset
label_desc: Use image node_id 3 for calling the _WordGenerator obj's underlying member method code with example usage: obj.__len__() and returns: self