code: def test_mse_lpips_loss(shape, backbone, mse_param, lpips_param):
      normalize = True
      rng = torch.Generator()
      rng.manual_seed(int(torch.prod(torch.tensor(shape))))
  
      base_img = torch.rand(size=shape, generator=rng)
      img = torch.rand(size=shape, generator=rng)
  
      if not normalize:
          base_img = base_img * 2.0 - 1.0
          img = img * 2.0 - 1.0
  
      loss_fn = MSELPIPSLoss(
          mse_param=mse_param,
          lpips_param=lpips_param,
          backbone=backbone,
          normalize=normalize,
      )
      output = loss_fn(img, base_img)
  
      lpips_model = NormFixLPIPS(net=backbone).eval()
      for p in lpips_model.parameters():
          p.requires_grad_(False)
      est = (
          mse_param * torch.mean((img - base_img) ** 2)
          + lpips_param
          * lpips_model(img, base_img, normalize=normalize).mean()
      )
  
      assert torch.allclose(output, est)
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_mse_lpips_loss(shape, backbone, mse_param, lpips_param) without return types