code: def test_sum_duplicates():
      arr1d = coo_array(([2, 2, 2], ([1, 0, 1],)))
      assert arr1d.nnz == 3
      assert np.array_equal(arr1d.toarray(), np.array([2, 4]))
      arr1d.sum_duplicates()
      assert arr1d.nnz == 2
      assert np.array_equal(arr1d.toarray(), np.array([2, 4]))
  
imports: import numpy
  import pytest
  from scipy.sparse import coo_array
label_desc: Use image node_id 18 for calling a global function with example usage: test_sum_duplicates() without return types