code: def test_loss():
      d_scores = CategoricalCrossentropy().get_grad(scores0, labels0)
      assert d_scores.dtype == "float32"
      assert d_scores.shape == scores0.shape
      d_scores = SequenceCategoricalCrossentropy().get_grad(
          [scores0], [labels0]
      )
      assert d_scores[0].dtype == "float32"
      assert d_scores[0].shape == scores0.shape
      assert SequenceCategoricalCrossentropy().get_grad([], []) == []
  
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 1 for calling a global function with example usage: test_loss() without return types