code: def test_hinge_loss(positive_scores, negative_scores):
      actual = hinge_loss(positive_scores, negative_scores)
      expected = (7.3872 + 37.00656384) / 4
  
      assert_almost_equal(actual.item(), expected, decimal=3)
  
file_path: collie/tests/test_losses.py
imports: from numpy.testing import assert_almost_equal, assert_array_equal
  import pytest
  import torch
  from collie.loss import adaptive_bpr_loss, adaptive_hinge_loss, bpr_loss, hinge_loss, ideal_difference_from_metadata, warp_loss
label_desc: Use image node_id 6 for calling a global function with example usage: test_hinge_loss(positive_scores, negative_scores) without return types