class_docstr: Constrained MNIST dataset.
  
  Args:
      num_samples: number of examples per selected class/digit
      digits: list selected MNIST digits/classes
      kwargs: Same as MNIST
  
  Examples:
      >>> dataset = TrialMNIST(".", download=True)
      >>> len(dataset)
      300
      >>> sorted(set([d.item() for d in dataset.targets]))
      [0, 1, 2]
      >>> torch.bincount(dataset.targets)
      tensor([100, 100, 100])
class_docstr_tok: ["Constrained","MNIST","dataset",".","Args",":","num_samples",":","number","of","examples","per","selected","class\/digit","digits",":","list","selected","MNIST","digits\/classes","kwargs",":","Same","as","MNIST","Examples",":",">",">",">","dataset","=","TrialMNIST","(","``",".","``",",","download=True",")",">",">",">","len","(","dataset",")","300",">",">",">","sorted","(","set","(","[","d.item","(",")","for","d","in","dataset.targets","]",")",")","[","0",",","1",",","2","]",">",">",">","torch.bincount","(","dataset.targets",")","tensor","(","[","100",",","100",",","100","]",")"]
code: def _download(self, data_folder: str) -> None:
      super()._download(data_folder)
      for fname in (self.TRAIN_FILE_NAME, self.TEST_FILE_NAME):
          path_fname = os.path.join(self.cached_folder_path, fname)
          assert os.path.isfile(
              path_fname
          ), f"Missing cached file: {path_fname}"
          data, targets = self._try_load(path_fname)
          data, targets = self._prepare_subset(
              data, targets, self.num_samples, self.digits
          )
          torch.save(
              (data, targets),
              os.path.join(self.cached_folder_path, fname),
          )
  
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 TrialMNIST obj's underlying member method code with example usage: obj._download(data_folder) without return types