code: def __init__(
      self, config: DatasetConfig, cache_dir: Optional[str] = None
  ):
      try:
          from torchvision.io import write_png
  
          self.write_png = write_png
      except ImportError:
          logger.error(
              "torchvision is not installed. "
              "In order to install all image feature dependencies run "
              "pip install ludwig[image]"
          )
          raise
      super().__init__(config, cache_dir)
  
file_path: ludwig/ludwig/datasets/loaders/mnist.py
imports: import logging
  import os
  import struct
  from multiprocessing.pool import ThreadPool
  from typing import List, Optional
  import numpy
  import pandas
  import torch
  from ludwig.datasets.dataset_config import DatasetConfig
  from ludwig.datasets.loaders.dataset_loader import DatasetLoader
  from ludwig.utils.fs_utils import makedirs
label_desc: Use image node_id 1 to create a new MNISTLoader object from inherited base classes: DatasetLoader with example: obj = MNISTLoader(config, cache_dir)