code: def setUp(self):
      set_determinism(seed=0)
      self.data_dir = os.path.join(
          os.path.dirname(os.path.realpath(__file__)), "testing_data"
      )
      data_dir = os.path.join(self.data_dir, "MedNIST")
      dataset_file = os.path.join(self.data_dir, "MedNIST.tar.gz")
  
      if not os.path.exists(data_dir):
          with skip_if_downloading_fails():
              data_spec = testing_data_config("images", "mednist")
              download_and_extract(
                  data_spec["url"],
                  dataset_file,
                  self.data_dir,
                  hash_val=data_spec["hash_val"],
                  hash_type=data_spec["hash_type"],
              )
  
      assert os.path.exists(data_dir)
  
      class_names = sorted(
          x
          for x in os.listdir(data_dir)
          if os.path.isdir(os.path.join(data_dir, x))
      )
      image_files = [
          [
              os.path.join(data_dir, class_name, x)
              for x in sorted(
                  os.listdir(os.path.join(data_dir, class_name))
              )
          ]
          for class_name in class_names
      ]
      image_file_list, image_classes = [], []
      for i, _ in enumerate(class_names):
          image_file_list.extend(image_files[i])
          image_classes.extend([i] * len(image_files[i]))
  
      # split train, val, test
      valid_frac, test_frac = 0.1, 0.1
      self.train_x, self.train_y = [], []
      self.val_x, self.val_y = [], []
      self.test_x, self.test_y = [], []
      for i in range(len(image_classes)):
          rann = np.random.random()
          if rann < valid_frac:
              self.val_x.append(image_file_list[i])
              self.val_y.append(image_classes[i])
          elif rann < test_frac + valid_frac:
              self.test_x.append(image_file_list[i])
              self.test_y.append(image_classes[i])
          else:
              self.train_x.append(image_file_list[i])
              self.train_y.append(image_classes[i])
  
      self.device = "cuda:0" if torch.cuda.is_available() else "cpu:0"
  
imports: from __future__ import annotations
  import os
  import unittest
  import warnings
  import numpy
  import torch
  from torch.utils.data import DataLoader
  import monai
  from monai.apps import download_and_extract
  from monai.data import decollate_batch
  from monai.metrics import ROCAUCMetric
  from monai.networks import eval_mode
  from monai.networks.nets import DenseNet121
  from monai.transforms import Activations, AsDiscrete, Compose, EnsureChannelFirst, LoadImage, RandFlip, RandRotate, RandZoom, ScaleIntensity, Transpose
  from monai.utils import set_determinism
  from tests.testing_data.integration_answers import test_integration_value
  from tests.utils import DistTestCase, TimedCall, skip_if_downloading_fails, skip_if_quick, testing_data_config
label_desc: Use image node_id 1 for calling the IntegrationClassification2D obj's underlying member method code with example usage: obj.setUp() without return types