code: def test_proj_l1_ball():
      rng = np.random.RandomState(0)
      v = rng.randn(100)
      w = project_l1_ball(v, z=50)
      np.testing.assert_almost_equal(np.sum(np.abs(w)), 50)
  
imports: import numpy
  import pytest
  from lightning.impl.penalty import project_l1_ball, project_simplex
label_desc: Use image node_id 3 for calling a global function with example usage: test_proj_l1_ball() without return types