code: def setUp(self):
      super().setUp()
      # Mock tempfile.gettempdir() to be unique for each test to avoid race
      # condition when downloading model since these tests may run in parallel.
      mock_gettempdir = unittest_mock.patch.object(
          tempfile,
          "gettempdir",
          return_value=self.create_tempdir(),
          autospec=True,
      )
      self.mock_gettempdir = mock_gettempdir.start()
      self.addCleanup(mock_gettempdir.stop)
      self._img1 = tf.fill(dims=(1, 256, 256, 3), value=0.1)
      self._img2 = tf.fill(dims=(1, 256, 256, 3), value=0.9)
  
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 1 for calling the ImagePerceptualQualityLossTest obj's underlying member method code with example usage: obj.setUp() without return types