class_docstr: Trivial objective extracting the last dimension.
  
  Example:
      >>> identity_objective = IdentityMCObjective()
      >>> samples = sampler(posterior)
      >>> objective = identity_objective(samples)
class_docstr_tok: ["Trivial","objective","extracting","the","last","dimension",".","Example",":",">",">",">","identity_objective","=","IdentityMCObjective","(",")",">",">",">","samples","=","sampler","(","posterior",")",">",">",">","objective","=","identity_objective","(","samples",")"]
code: def forward(
      self, samples: Tensor, X: Optional[Tensor] = None
  ) -> Tensor:
      return samples.squeeze(-1)
  
imports: from __future__ import annotations
  import inspect
  import warnings
  from abc import ABC, abstractmethod
  from typing import Callable, List, Optional, TYPE_CHECKING, Union
  import torch
  from botorch.exceptions.errors import BotorchTensorDimensionError, UnsupportedError
  from botorch.exceptions.warnings import InputDataWarning
  from botorch.models.model import Model
  from botorch.models.transforms.outcome import Standardize
  from botorch.posteriors.gpytorch import GPyTorchPosterior, scalarize_posterior
  from botorch.sampling import IIDNormalSampler
  from botorch.utils import apply_constraints
  from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal
  from linear_operator.operators.dense_linear_operator import to_linear_operator
  from torch import Tensor
  from torch.nn import Module
  from botorch.models.deterministic import DeterministicModel
label_desc: Use image node_id 1 for calling the IdentityMCObjective obj's underlying member method code with example usage: obj.forward(samples, X) and returns: samples