code: def test_soft_jaccard_score_2(y_true, y_pred, expected, eps):
      y_true = torch.tensor(y_true, dtype=torch.float32)
      y_pred = torch.tensor(y_pred, dtype=torch.float32)
      actual = F.soft_jaccard_score(y_pred, y_true, dims=[1], eps=eps)
      actual = actual.mean()
      assert float(actual) == pytest.approx(expected, eps)
  
imports: import numpy
  import pytest
  import pytorch_toolbelt.losses.functional
  import torch
  from pytorch_toolbelt import losses
  from torch import nn
  from pytorch_toolbelt.losses import BinaryFocalLoss, CrossEntropyFocalLoss
label_desc: Use image node_id 4 for calling a global function with example usage: test_soft_jaccard_score_2(y_true, y_pred, expected, eps) without return types