code: def test_weighted_mc_multi_output_objective(self):
      with self.assertRaises(BotorchTensorDimensionError):
          WeightedMCMultiOutputObjective(weights=torch.rand(3, 1))
      with self.assertRaises(BotorchTensorDimensionError):
          WeightedMCMultiOutputObjective(
              weights=torch.rand(3), outcomes=[0, 1], num_outcomes=3
          )
      for batch_shape, m, dtype in itertools.product(
          ([], [3]), (2, 3), (torch.float, torch.double)
      ):
          weights = torch.rand(m, device=self.device, dtype=dtype)
          objective = WeightedMCMultiOutputObjective(weights=weights)
          samples = torch.rand(
              *batch_shape, 2, m, device=self.device, dtype=dtype
          )
          self.assertTrue(
              torch.equal(objective(samples), samples * weights)
          )
  
imports: import itertools
  import warnings
  import torch
  from botorch.acquisition.multi_objective.multi_output_risk_measures import MultiOutputExpectation
  from botorch.acquisition.multi_objective.objective import FeasibilityWeightedMCMultiOutputObjective, IdentityMCMultiOutputObjective, MCMultiOutputObjective, UnstandardizeMCMultiOutputObjective, WeightedMCMultiOutputObjective
  from botorch.acquisition.objective import IdentityMCObjective, UnstandardizePosteriorTransform
  from botorch.exceptions.errors import BotorchError, BotorchTensorDimensionError
  from botorch.models.transforms.outcome import Standardize
  from botorch.utils.testing import BotorchTestCase, MockModel, MockPosterior
label_desc: Use image node_id 1 for calling the TestWeightedMCMultiOutputObjective obj's underlying member method code with example usage: obj.test_weighted_mc_multi_output_objective() without return types