code: def test_result_onehot_target_include_bg(self):
      size = [3, 3, 5, 5]
      label = torch.randint(low=0, high=2, size=size)
      pred = torch.randn(size)
      for reduction in ["sum", "mean", "none"]:
          for weight in [
              None,
              torch.tensor([1.0, 1.0, 2.0]),
              (3, 2.0, 1),
          ]:
              common_params = {
                  "include_background": True,
                  "to_onehot_y": False,
                  "reduction": reduction,
                  "weight": weight,
              }
              for lambda_focal in [0.5, 1.0, 1.5]:
                  dice_focal = DiceFocalLoss(
                      gamma=1.0,
                      lambda_focal=lambda_focal,
                      **common_params,
                  )
                  dice = DiceLoss(**common_params)
                  focal = FocalLoss(gamma=1.0, **common_params)
                  result = dice_focal(pred, label)
                  expected_val = dice(
                      pred, label
                  ) + lambda_focal * focal(pred, label)
                  np.testing.assert_allclose(result, expected_val)
  
file_path: MONAI/tests/test_dice_focal_loss.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.losses import DiceFocalLoss, DiceLoss, FocalLoss
  from tests.utils import test_script_save
label_desc: Use image node_id 1 for calling the TestDiceFocalLoss obj's underlying member method code with example usage: obj.test_result_onehot_target_include_bg() without return types