class_docstr: An abstract base class for random datasets.
  
  Intended for subclassing, this class provides the framework for implementing
  custom random datasets. Each subclass should provide
  a concrete implementation of the `_generate_random_item` method.
  
  Attributes:
      size (int, default=100): The total number of items the dataset will contain.
docstr: Get the total number of items in the dataset.
  
  Returns:
      int: Total number of items.
docstr_tok: ["Get","the","total","number","of","items","in","the","dataset",".","Returns",":","int",":","Total","number","of","items","."]
code: def __len__(self) -> int:
      """
      Get the total number of items in the dataset.
  
      Returns:
          int: Total number of items.
      """
      return self.size
  
file_path: tnt/torchtnt/utils/data/synthetic_data.py
imports: from __future__ import annotations
  import abc
  import logging
  from dataclasses import dataclass, field
  from typing import Dict
  import torch
  from torch.utils.data import Dataset
  from torchtnt.utils.device import get_device_from_env
label_desc: Use image node_id 2 for calling the AbstractRandomDataset obj's underlying member method code with example usage: obj.__len__() and returns: self