code: def __init__(
      self,
      backend: Backend,
      autosklearn_seed: int,
      resampling_strategy: Union[
          str, BaseCrossValidator, _RepeatedSplits, BaseShuffleSplit
      ],
      metrics: Sequence[Scorer],
      cost_for_crash: float,
      abort_on_first_run_crash: bool,
      port: int,
      pynisher_context: str,
      multi_objectives: List[str],
      initial_num_run: int = 1,
      stats: Optional[Stats] = None,
      run_obj: str = "quality",
      par_factor: int = 1,
      scoring_functions: Optional[List[Scorer]] = None,
      output_y_hat_optimization: bool = True,
      include: Optional[List[str]] = None,
      exclude: Optional[List[str]] = None,
      memory_limit: Optional[int] = None,
      disable_file_output: bool = False,
      init_params: Optional[Dict[str, Any]] = None,
      budget_type: Optional[str] = None,
      ta: Optional[Callable] = None,  # Required by SMAC's parent class
      **resampling_strategy_args: Any,
  ):
      if resampling_strategy == "holdout":
          eval_function = (
              autosklearn.evaluation.train_evaluator.eval_holdout
          )
      elif resampling_strategy == "holdout-iterative-fit":
          eval_function = (
              autosklearn.evaluation.train_evaluator.eval_iterative_holdout
          )
      elif resampling_strategy == "cv-iterative-fit":
          eval_function = (
              autosklearn.evaluation.train_evaluator.eval_iterative_cv
          )
      elif resampling_strategy == "cv" or isinstance(
          resampling_strategy,
          (BaseCrossValidator, _RepeatedSplits, BaseShuffleSplit),
      ):
          eval_function = autosklearn.evaluation.train_evaluator.eval_cv
      elif resampling_strategy == "partial-cv":
          eval_function = (
              autosklearn.evaluation.train_evaluator.eval_partial_cv
          )
      elif resampling_strategy == "partial-cv-iterative-fit":
          eval_function = (
              autosklearn.evaluation.train_evaluator.eval_partial_cv_iterative
          )
      elif resampling_strategy == "test":
          eval_function = autosklearn.evaluation.test_evaluator.eval_t
          output_y_hat_optimization = False
      else:
          raise ValueError(
              "Unknown resampling strategy %s" % resampling_strategy
          )
  
      self.worst_possible_result = cost_for_crash
  
      eval_function = functools.partial(
          fit_predict_try_except_decorator,
          ta=eval_function,
          cost_for_crash=self.worst_possible_result,
      )
  
      super().__init__(
          ta=eval_function,
          stats=stats,
          run_obj=run_obj,
          par_factor=par_factor,
          cost_for_crash=self.worst_possible_result,
          abort_on_first_run_crash=abort_on_first_run_crash,
          multi_objectives=multi_objectives,
      )
  
      self.backend = backend
      self.autosklearn_seed = autosklearn_seed
      self.resampling_strategy = resampling_strategy
      self.initial_num_run = initial_num_run
      self.metrics = metrics
      self.resampling_strategy = resampling_strategy
      self.resampling_strategy_args = resampling_strategy_args
      self.scoring_functions = scoring_functions
      # TODO deactivate output_y_hat_optimization and let respective evaluator decide
      self.output_y_hat_optimization = output_y_hat_optimization
      self.include = include
      self.exclude = exclude
      self.disable_file_output = disable_file_output
      self.init_params = init_params
      self.budget_type = budget_type
  
      if memory_limit is not None:
          memory_limit = int(math.ceil(memory_limit))
      self.memory_limit = memory_limit
  
      dm = self.backend.load_datamanager()
      self._get_test_loss = "X_test" in dm.data and "Y_test" in dm.data
  
      self.port = port
      self.pynisher_context = pynisher_context
      if self.port is None:
          self.logger: Union[
              logging.Logger, PickableLoggerAdapter
          ] = logging.getLogger("TAE")
      else:
          self.logger = get_named_client_logger(
              name="TAE",
              port=self.port,
          )
  
imports: from __future__ import annotations
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Type, Union, cast
  import functools
  import json
  import logging
  import math
  import multiprocessing
  import time
  import traceback
  from queue import Empty
  import numpy
  import pynisher
  from ConfigSpace import Configuration
  from sklearn.model_selection._split import BaseCrossValidator, BaseShuffleSplit, _RepeatedSplits
  from smac.runhistory.runhistory import RunInfo, RunValue
  from smac.stats.stats import Stats
  from smac.tae import StatusType, TAEAbortException
  from smac.tae.execute_func import AbstractTAFunc
  import autosklearn.evaluation.test_evaluator
  import autosklearn.evaluation.train_evaluator
  import autosklearn.evaluation.util
  import autosklearn.pipeline.components
  from autosklearn.automl_common.common.utils.backend import Backend
  from autosklearn.evaluation.train_evaluator import TYPE_ADDITIONAL_INFO
  from autosklearn.metrics import Scorer
  from autosklearn.util.logging_ import PickableLoggerAdapter, get_named_client_logger
  from autosklearn.util.parallel import preload_modules
label_desc: Use image node_id 1 to create a new ExecuteTaFuncWithQueue object from inherited base classes: AbstractTAFunc with example: obj = ExecuteTaFuncWithQueue(backend, autosklearn_seed, resampling_strategy, metrics, cost_for_crash, abort_on_first_run_crash, port, pynisher_context, multi_objectives, initial_num_run, stats, run_obj, par_factor, scoring_functions, output_y_hat_optimization, include, exclude, memory_limit, disable_file_output, init_params, budget_type, ta)