class_docstr: Carbon copy of ``tests_pytorch.helpers.datasets.MNIST``.
  
  We cannot import the tests as they are not distributed with the package.
  See https://github.com/Lightning-AI/lightning/pull/7614#discussion_r671183652 for more context.
  
  .. warning::  This is meant for testing/debugging and is experimental.
class_docstr_tok: ["Carbon","copy","of","``","tests_pytorch.helpers.datasets.MNIST","``",".","We","can","not","import","the","tests","as","they","are","not","distributed","with","the","package",".","See","https",":","\/\/github.com\/Lightning-AI\/lightning\/pull\/7614","#","discussion_r671183652","for","more","context",".","..","warning",":",":","This","is","meant","for","testing\/debugging","and","is","experimental","."]
code: def __len__(self) -> int:
      return len(self.data)
  
imports: import logging
  import os
  import random
  import time
  import urllib
  from typing import Any, Callable, Optional, Sized, Tuple, Union
  from urllib.error import HTTPError
  from warnings import warn
  import torch
  from torch import Tensor
  from torch.utils.data import DataLoader, Dataset, random_split
  from lightning.fabric.utilities.imports import _IS_WINDOWS
  from lightning.pytorch import LightningDataModule
  from lightning.pytorch.utilities.imports import _TORCHVISION_AVAILABLE
label_desc: Use image node_id 3 for calling the _MNIST obj's underlying member method code with example usage: obj.__len__() and returns: len