code: def construct_acquisition_and_optimizer_options(
      acqf_options: TConfig, model_gen_options: Optional[TConfig] = None
  ) -> Tuple[TConfig, TConfig]:
      """Extract acquisition and optimizer options from `model_gen_options`."""
      acq_options = acqf_options.copy()
      opt_options = {}
  
      if model_gen_options:
          acq_options.update(
              checked_cast(
                  dict, model_gen_options.get(Keys.ACQF_KWARGS, {})
              )
          )
          # TODO: Add this if all acq. functions accept the `subset_model`
          # kwarg or opt for kwarg filtering.
          # acq_options[SUBSET_MODEL] = model_gen_options.get(SUBSET_MODEL)
          opt_options = checked_cast(
              dict, model_gen_options.get(Keys.OPTIMIZER_KWARGS, {})
          ).copy()
      return acq_options, opt_options
  
imports: import warnings
  from logging import Logger
  from typing import Any, Callable, Dict, List, Optional, OrderedDict, Tuple, Type
  import torch
  from ax.core.search_space import SearchSpaceDigest
  from ax.exceptions.core import AxError, AxWarning, UnsupportedError
  from ax.models.types import TConfig
  from ax.utils.common.constants import Keys
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, not_none
  from botorch.acquisition.acquisition import AcquisitionFunction
  from botorch.acquisition.logei import qLogNoisyExpectedImprovement
  from botorch.acquisition.multi_objective.logei import qLogNoisyExpectedHypervolumeImprovement
  from botorch.fit import fit_fully_bayesian_model_nuts, fit_gpytorch_mll
  from botorch.models.fully_bayesian import SaasFullyBayesianSingleTaskGP
  from botorch.models.gp_regression import SingleTaskGP
  from botorch.models.gp_regression_fidelity import SingleTaskMultiFidelityGP
  from botorch.models.gp_regression_mixed import MixedSingleTaskGP
  from botorch.models.gpytorch import BatchedMultiOutputGPyTorchModel, GPyTorchModel
  from botorch.models.model import Model, ModelList
  from botorch.models.multitask import MultiTaskGP
  from botorch.models.pairwise_gp import PairwiseGP
  from botorch.utils.datasets import SupervisedDataset
  from botorch.utils.transforms import is_fully_bayesian
  from gpytorch.mlls.marginal_log_likelihood import MarginalLogLikelihood
  from torch import Tensor
label_desc: Use image node_id 4 for calling a global function with example usage: construct_acquisition_and_optimizer_options(acqf_options, model_gen_options) and returns: acq_options,  opt_options