code: def test_sparsemax_grad():
      x = torch.randn(4, 6, dtype=torch.float64, requires_grad=True)
      gradcheck(sparsemax_bisect, (x,), eps=1e-5)
  
file_path: ludwig/tests/ludwig/utils/entmax/test_root_finding.py
imports: from functools import partial
  from itertools import product
  import pytest
  import torch
  from torch.autograd import gradcheck
  from ludwig.utils.entmax.activations import entmax15, sparsemax
  from ludwig.utils.entmax.root_finding import entmax_bisect, sparsemax_bisect
label_desc: Use image node_id 3 for calling a global function with example usage: test_sparsemax_grad() without return types