code: def test_softmax_temperature(temperature):
      model = Softmax_v2(
          temperature=temperature,
          init_W=lambda ops, shape: ops.xp.eye(shape[1], dtype="f"),
          init_b=lambda ops, shape: ops.xp.zeros(shape, dtype="f"),
      )
  
      X = OPS.xp.arange(-1, 1, 0.2, dtype="f").reshape(1, 10)
      targets = OPS.asarray1i([4])
      Y_gold = OPS.xp.eye(10, dtype="f")[targets]
      model.initialize(X, Y_gold)
  
      Yt, dXt = torch_softmax_with_temperature(model, X, targets)
  
      Y, backprop = model(X, is_train=True)
      dX = backprop(Y - Y_gold)
  
      assert_allclose(Y, Yt, atol=1e-4)
      assert_allclose(dX, dXt, atol=1e-4)
  
file_path: thinc/thinc/tests/layers/test_softmax.py
imports: from typing import Tuple, cast
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from thinc.api import Model, NumpyOps, Softmax_v2
  from thinc.types import Floats2d, Ints1d
  from thinc.util import has_torch, torch2xp, xp2torch
label_desc: Use image node_id 3 for calling a global function with example usage: test_softmax_temperature(temperature) without return types