code: def get_X_baseline(
      acq_function: AcquisitionFunction,
  ) -> Optional[Tensor]:
      r"""Extract X_baseline from an acquisition function.
  
      This tries to find the baseline set of points. First, this checks if the
      acquisition function has an `X_baseline` attribute. If it does not,
      then this method attempts to use the model's `train_inputs` as `X_baseline`.
  
      Args:
          acq_function: The acquisition function.
  
      Returns
          An optional `n x d`-dim tensor of baseline points. This is None if no
              baseline points are found.
      """
      try:
          X = acq_function.X_baseline
          # if there are no baseline points, use training points
          if X.shape[0] == 0:
              raise BotorchError
      except (BotorchError, AttributeError):
          try:
              # for entropy MOO methods
              model = acq_function.mo_model
          except AttributeError:
              try:
                  # some acquisition functions do not have a model attribute
                  # e.g. FixedFeatureAcquisitionFunction
                  model = acq_function.model
              except AttributeError:
                  warn("Failed to extract X_baseline.", BotorchWarning)
                  return
          try:
              # Make sure we get the original train inputs.
              m = (
                  model.models[0]
                  if isinstance(model, ModelListGPyTorchModel)
                  else model
              )
              if m._has_transformed_inputs:
                  X = m._original_train_inputs
              else:
                  X = m.train_inputs[0]
          except (BotorchError, AttributeError):
              warn("Failed to extract X_baseline.", BotorchWarning)
              return
      # just use one batch
      while X.ndim > 2:
          X = X[0]
      return X
  
file_path: botorch/botorch/optim/utils/acquisition_utils.py
imports: from __future__ import annotations
  from typing import Dict, Optional, Union
  from warnings import warn
  import torch
  from botorch.acquisition.acquisition import AcquisitionFunction
  from botorch.exceptions.errors import BotorchError
  from botorch.exceptions.warnings import BotorchWarning
  from botorch.models.gpytorch import ModelListGPyTorchModel
  from torch import Tensor
label_desc: Use image node_id 3 for calling a global function with example usage: get_X_baseline(acq_function) and returns: X