class_docstr: Customized `MNIST <http://yann.lecun.com/exdb/mnist/>`_ dataset for testing PyTorch Lightning without the
  torchvision dependency.
  
  Part of the code was copied from
  https://github.com/pytorch/vision/blob/build/v0.5.0/torchvision/datasets/mnist.py
  
  Args:
      root: Root directory of dataset where ``MNIST/processed/training.pt``
          and  ``MNIST/processed/test.pt`` exist.
      train: If ``True``, creates dataset from ``training.pt``,
          otherwise from ``test.pt``.
      normalize: mean and std deviation of the MNIST dataset.
      download: If true, downloads the dataset from the internet and
          puts it in root directory. If dataset is already downloaded, it is not
          downloaded again.
  
  Examples:
      >>> dataset = MNIST(".", download=True)
      >>> len(dataset)
      60000
      >>> torch.bincount(dataset.targets)
      tensor([5923, 6742, 5958, 6131, 5842, 5421, 5918, 6265, 5851, 5949])
class_docstr_tok: ["Customized","`","MNIST","<","http",":","\/\/yann.lecun.com\/exdb\/mnist\/",">","`","_","dataset","for","testing","PyTorch","Lightning","without","the","torchvision","dependency",".","Part","of","the","code","was","copied","from","https",":","\/\/github.com\/pytorch\/vision\/blob\/build\/v0.5.0\/torchvision\/datasets\/mnist.py","Args",":","root",":","Root","directory","of","dataset","where","``","MNIST\/processed\/training.pt","``","and","``","MNIST\/processed\/test.pt","``","exist",".","train",":","If","``","True","``",",","creates","dataset","from","``","training.pt","``",",","otherwise","from","``","test.pt","``",".","normalize",":","mean","and","std","deviation","of","the","MNIST","dataset",".","download",":","If","true",",","downloads","the","dataset","from","the","internet","and","puts","it","in","root","directory",".","If","dataset","is","already","downloaded",",","it","is","not","downloaded","again",".","Examples",":",">",">",">","dataset","=","MNIST","(","``",".","``",",","download=True",")",">",">",">","len","(","dataset",")","60000",">",">",">","torch.bincount","(","dataset.targets",")","tensor","(","[","5923",",","6742",",","5958",",","6131",",","5842",",","5421",",","5918",",","6265",",","5851",",","5949","]",")"]
code: def __len__(self) -> int:
      return len(self.data)
  
imports: import logging
  import os
  import random
  import time
  import urllib.request
  from typing import Optional, Sequence, Tuple
  import torch
  from torch import Tensor
  from torch.utils.data import Dataset
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