code: def test_weighted_perceptul_loss(
      self,
      use_mock_loss_op: bool,
      feature_weight: Sequence[float],
      loss_weight: loss_functions.PerceptualLossWeight,
      loss_values: Dict[str, float],
  ):
      perceptual_loss = MockPerceptualLoss(
          use_mock_loss_op=use_mock_loss_op,
          feature_weight=feature_weight,
          loss_weight=loss_weight,
      )
      loss = perceptual_loss(img1=self._img1, img2=self._img2)
      self.assertEqual(
          list(loss.keys()), ["style_loss", "content_loss"]
      )
      self.assertNear(
          loss["style_loss"], loss_values["style_loss"], 1e-4
      )
      self.assertNear(
          loss["content_loss"], loss_values["content_loss"], 1e-4
      )
  
imports: import math
  import tempfile
  from typing import Dict, Optional, Sequence
  from unittest import mock
  from absl.testing import parameterized
  import tensorflow
  from mediapipe.model_maker.python.core.utils import loss_functions
label_desc: Use image node_id 3 for calling the PerceptualLossTest obj's underlying member method code with example usage: obj.test_weighted_perceptul_loss(use_mock_loss_op, feature_weight, loss_weight, loss_values) without return types