code: def _generate_string(self, min_chars: int, max_chars: int) -> str:
      num_chars = random.randint(min_chars, max_chars)
      return "".join(
          random.choice(self.vocab) for _ in range(num_chars)
      )
  
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 2 for calling the _WordGenerator obj's underlying member method code with example usage: obj._generate_string(min_chars, max_chars) and returns: str