code: def check_retrieval_once(self, name, retrieval_func):
      self.cached_file = os.path.join(self.root, name)
      train, test = retrieval_func(
          withlabel=self.withlabel, ndim=self.ndim, scale=self.scale
      )
  
      for cifar_dataset in (train, test):
          if self.withlabel:
              self.assertIsInstance(
                  cifar_dataset, tuple_dataset.TupleDataset
              )
              cifar_dataset = cifar_dataset._datasets[0]
          else:
              self.assertIsInstance(cifar_dataset, numpy.ndarray)
  
          if self.ndim == 1:
              self.assertEqual(cifar_dataset.ndim, 2)
          else:
              # self.ndim == 3
              self.assertEqual(cifar_dataset.ndim, 4)
              self.assertEqual(
                  cifar_dataset.shape[2], cifar_dataset.shape[3]
              )
  
imports: import os
  import unittest
  import mock
  import numpy
  from chainer.dataset import download
  from chainer.datasets import get_cifar10
  from chainer.datasets import get_cifar100
  from chainer.datasets import tuple_dataset
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 5 for calling the TestCifar obj's underlying member method code with example usage: obj.check_retrieval_once(name, retrieval_func) without return types