code: def project_to_sample_points(
      X: Tensor, sample_points: Tensor
  ) -> Tensor:
      r"""Augment `X` with sample points at which to take weighted average.
  
      Args:
          X: A `batch_shape x 1 x d`-dim Tensor of with one d`-dim design points
              for each t-batch.
          sample_points: `p x d'`-dim Tensor (`d' < d`) of `d'`-dim sample points at
              which to compute the expectation. The `d'`-dims refer to the trailing
              columns of X.
      Returns:
          A `batch_shape x p x d` Tensor where the q-batch includes the `p` sample points.
      """
      batch_shape = X.shape[:-2]
      p, d_prime = sample_points.shape
      X_new = X.repeat(
          *(1 for _ in batch_shape), p, 1
      )  # batch_shape x p x d
      X_new[..., -d_prime:] = sample_points
      return X_new
  
imports: from __future__ import annotations
  import math
  from typing import Callable, Dict, List, Optional, Tuple
  import torch
  from botorch.acquisition.objective import IdentityMCObjective, MCAcquisitionObjective, PosteriorTransform
  from botorch.exceptions.errors import BotorchTensorDimensionError, DeprecationError, UnsupportedError
  from botorch.models.fully_bayesian import MCMC_DIM
  from botorch.models.model import Model
  from botorch.sampling.base import MCSampler
  from botorch.sampling.get_sampler import get_sampler
  from botorch.sampling.pathwise import draw_matheron_paths
  from botorch.utils.objective import compute_feasibility_indicator
  from botorch.utils.sampling import optimize_posterior_samples
  from botorch.utils.transforms import is_ensemble, normalize_indices
  from torch import Tensor
label_desc: Use image node_id 9 for calling a global function with example usage: project_to_sample_points(X, sample_points) and returns: X_new