code: def test_soft_sparsity():
      """Test for soft_sparsity operator"""
      tensor = T.tensor([[0.5, 1.3, 4.5], [0.8, 0.3, 2]])
      threshold = 2
      res = soft_sparsity_prox(tensor, threshold)
      true_res = T.tensor([[0.85, 1.5, 2.0], [1.15, 0.5, 0.0]])
      assert_array_almost_equal(true_res, res)
  
imports: import numpy
  from ...None import backend
  from ..proximal import svd_thresholding, smoothness_prox, soft_thresholding, hals_nnls, fista, active_set_nnls, procrustes, hard_thresholding, soft_sparsity_prox, simplex_prox, normalized_sparsity_prox, monotonicity_prox, unimodality_prox, l2_prox, l2_square_prox, admm
  from ...testing import assert_, assert_array_equal, assert_array_almost_equal
  from tensorly import tensor_to_vec, truncated_svd
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_soft_sparsity() without return types