code: def test_equality(dist, vect):
      assert int(dist.get_grad(vect, vect)[0][0]) == pytest.approx(
          0, eps
      )
      assert dist.get_loss(vect, vect) == pytest.approx(0, eps)
  
file_path: thinc/thinc/tests/test_loss.py
imports: import numpy
  import pytest
  from thinc import registry
  from thinc.api import CategoricalCrossentropy, CosineDistance, L2Distance, SequenceCategoricalCrossentropy
label_desc: Use image node_id 2 for calling a global function with example usage: test_equality(dist, vect) without return types