code: def _get_default_candidates_func(
      n_objectives: int,
      has_constraint: bool,
      consider_running_trials: bool,
  ) -> Callable[
      [
          "torch.Tensor",
          "torch.Tensor",
          Optional["torch.Tensor"],
          "torch.Tensor",
          Optional["torch.Tensor"],
      ],
      "torch.Tensor",
  ]:
      if (
          n_objectives > 3
          and not has_constraint
          and not consider_running_trials
      ):
          return ehvi_candidates_func
      elif n_objectives > 3:
          return qparego_candidates_func
      elif n_objectives > 1:
          return qehvi_candidates_func
      elif consider_running_trials:
          return qei_candidates_func
      else:
          return logei_candidates_func
  
imports: from typing import Any
  from typing import Callable
  from typing import Dict
  from typing import Optional
  from typing import Sequence
  from typing import Union
  import warnings
  import numpy
  from packaging import version
  from optuna import logging
  from optuna._experimental import experimental_class
  from optuna._experimental import experimental_func
  from optuna._imports import try_import
  from optuna._transform import _SearchSpaceTransform
  from optuna.distributions import BaseDistribution
  from optuna.samplers import BaseSampler
  from optuna.samplers import RandomSampler
  from optuna.samplers._base import _CONSTRAINTS_KEY
  from optuna.samplers._base import _process_constraints_after_trial
  from optuna.search_space import IntersectionSearchSpace
  from optuna.study import Study
  from optuna.study import StudyDirection
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
label_desc: Use image node_id 8 for calling a global function with example usage: _get_default_candidates_func(n_objectives, has_constraint, consider_running_trials) and returns: ehvi_candidates_func, qparego_candidates_func, qehvi_candidates_func, qei_candidates_func, logei_candidates_func