code: def test_invalid_feature_weight_raise_value_error(self):
      with self.assertRaisesRegex(
          ValueError,
          "Input feature weight length 2 is smaller than feature length 5",
      ):
          MockPerceptualLoss(feature_weight=[1.0, 2.0])(
              img1=self._img1, img2=self._img2
          )
  
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 2 for calling the PerceptualLossTest obj's underlying member method code with example usage: obj.test_invalid_feature_weight_raise_value_error() without return types