code: def test_datasets(self):
      for getter in get_dataset_getters():
          testname = "%s_%s" % (
              os.path.basename(__file__)
              .replace(".pyc", "")
              .replace(".py", ""),
              getter.__name__,
          )
  
          with self.subTest(testname):
              backend_mock = get_evaluation_backend()
              D = getter()
              D_ = copy.deepcopy(D)
              y = D.data["Y_train"]
              if len(y.shape) == 2 and y.shape[1] == 1:
                  D_.data["Y_train"] = y.flatten()
              backend_mock.load_datamanager.return_value = D_
              metric_lookup = {
                  MULTILABEL_CLASSIFICATION: f1_macro,
                  BINARY_CLASSIFICATION: accuracy,
                  MULTICLASS_CLASSIFICATION: accuracy,
                  REGRESSION: r2,
              }
              queue_ = multiprocessing.Queue()
  
              evaluator = TestEvaluator(
                  backend_mock,
                  queue_,
                  metrics=[metric_lookup[D.info["task"]]],
                  port=logging.handlers.DEFAULT_TCP_LOGGING_PORT,
                  additional_components=dict(),
              )
  
              evaluator.fit_predict_and_loss()
              return_value = read_queue(evaluator.queue)
              self.assertEqual(len(return_value), 1)
              self.assertEqual(len(return_value[0]), 3)
              self.assertTrue(np.isfinite(return_value[0]["loss"]))
  
imports: import copy
  import json
  import logging.handlers
  import multiprocessing
  import os
  import shutil
  import sys
  import tempfile
  import numpy
  from smac.tae import StatusType
  from autosklearn.automl_common.common.utils.backend import Backend
  from autosklearn.constants import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, MULTILABEL_CLASSIFICATION, REGRESSION
  from autosklearn.evaluation.test_evaluator import TestEvaluator, eval_t
  from autosklearn.evaluation.util import read_queue
  from autosklearn.metrics import accuracy, balanced_accuracy, f1_macro, r2
  from autosklearn.util.pipeline import get_configuration_space
  import unittest
  import unittest.mock
  import test.conftest
  from evaluation_util import SCORER_LIST, BaseEvaluatorTest, get_dataset_getters, get_evaluation_backend, get_multiclass_classification_datamanager
label_desc: Use image node_id 1 for calling the TestEvaluator_Test obj's underlying member method code with example usage: obj.test_datasets() without return types