code: def test_sparsemax(input_tensor: torch.Tensor) -> None:
      output_tensor = sparsemax(input_tensor)
  
      assert isinstance(output_tensor, torch.Tensor)
      assert output_tensor.equal(
          torch.tensor([[0, 0, 1], [1, 0, 0]], dtype=torch.float32)
      )
  
file_path: ludwig/tests/ludwig/modules/test_tabnet_modules.py
imports: from typing import Optional
  import pytest
  import torch
  from ludwig.modules.tabnet_modules import AttentiveTransformer, FeatureBlock, FeatureTransformer, TabNet
  from ludwig.utils.entmax import sparsemax
  from tests.integration_tests.parameter_update_utils import check_module_parameters_updated
label_desc: Use image node_id 1 for calling a global function with example usage: test_sparsemax(input_tensor) without return types