code: def dict_mse_loss(y_pred, y_true):
      return sum(
          F.mse_loss(y_pred[k], y_true[k]) for k in y_true.keys()
      )
  
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from poutyne import Model
  from tests.framework.model.base import ModelFittingTestCase
label_desc: Use image node_id 1 for calling a global function with example usage: dict_mse_loss(y_pred, y_true) and returns: sum