code: def _draw_matheron_paths_ExactGP(
      model: ExactGP,
      *,
      sample_shape: Size,
      prior_sampler: TPathwisePriorSampler,
      update_strategy: TPathwiseUpdate,
  ) -> MatheronPath:
      (train_X,) = get_train_inputs(model, transformed=True)
      train_Y = get_train_targets(model, transformed=True)
      with delattr_ctx(model, "outcome_transform"):
          # Generate draws from the prior
          prior_paths = prior_sampler(
              model=model, sample_shape=sample_shape
          )
          sample_values = prior_paths.forward(train_X)
  
          # Compute pathwise updates
          update_paths = update_strategy(
              model=model,
              sample_values=sample_values,
              train_targets=train_Y,
          )
  
      return MatheronPath(
          prior_paths=prior_paths,
          update_paths=update_paths,
          output_transform=get_output_transform(model),
      )
  
file_path: botorch/botorch/sampling/pathwise/posterior_samplers.py
imports: from __future__ import annotations
  from typing import Any, Optional, Union
  from botorch.models.approximate_gp import ApproximateGPyTorchModel
  from botorch.models.model_list_gp_regression import ModelListGP
  from botorch.sampling.pathwise.paths import PathDict, PathList, SamplePath
  from botorch.sampling.pathwise.prior_samplers import draw_kernel_feature_paths, TPathwisePriorSampler
  from botorch.sampling.pathwise.update_strategies import gaussian_update, TPathwiseUpdate
  from botorch.sampling.pathwise.utils import get_output_transform, get_train_inputs, get_train_targets, TInputTransform, TOutputTransform
  from botorch.utils.context_managers import delattr_ctx
  from botorch.utils.dispatcher import Dispatcher
  from gpytorch.models import ApproximateGP, ExactGP, GP
  from torch import Size
label_desc: Use image node_id 3 for calling a global function with example usage: _draw_matheron_paths_ExactGP(model) and returns: MatheronPath