code: def test_dict_output_case(self, broadcast):
      if broadcast:
          # Test broadcasting single loss to all outputs
          compile_loss = CompileLoss(
              loss="mse",
          )
      else:
          compile_loss = CompileLoss(
              loss={"a": "mse", "b": "mse"},
          )
      # Test symbolic build
      y_true = {
          "a": backend.KerasTensor((3, 4)),
          "b": backend.KerasTensor((3, 4)),
      }
      y_pred = {
          "a": backend.KerasTensor((3, 4)),
          "b": backend.KerasTensor((3, 4)),
      }
      compile_loss.build(y_true, y_pred)
      # Test eager build
      y_true = {
          "a": np.array([[0.1, 0.2], [0.3, 0.4], [0.5, 0.6]]),
          "b": np.array([[0.7, 0.8], [0.9, 1.0], [1.1, 1.2]]),
      }
      y_pred = {
          "a": np.array([[1.2, 1.1], [1.0, 0.9], [0.8, 0.7]]),
          "b": np.array([[0.6, 0.5], [0.4, 0.3], [0.2, 0.1]]),
      }
      sample_weight = {
          "a": np.array([1.0, 2.0, 3.0]),
          "b": np.array([3.0, 2.0, 1.0]),
      }
      compile_loss.build(y_true, y_pred)
      value = compile_loss(y_true, y_pred, sample_weight)
      self.assertAllClose(value, 1.266666, atol=1e-5)
  
imports: import numpy
  from absl.testing import parameterized
  from keras import backend
  from keras import metrics
  from keras import metrics
  from keras import ops
  from keras import testing
  from keras.trainers.compile_utils import CompileLoss
  from keras.trainers.compile_utils import CompileMetrics
label_desc: Use image node_id 4 for calling the TestCompileLoss obj's underlying member method code with example usage: obj.test_dict_output_case(broadcast) without return types