code: def test_gini():
      w = torch.tensor([[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1000.0]])
      assert torch.isclose(gini(w), torch.tensor(0.5))
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_gini() without return types