code: def test_array_add_sparse(
      sparse_data,
      method_name,
      class_name,
      on_device,
  ):
      coo_ind, val_dtype, val, shp = sparse_data
  
      # set backed to 'torch' as this is the only backend which supports sparse arrays
      ivy.set_backend("torch")
  
      # initiate a sparse array
      sparse_inst = ivy.sparse_array.SparseArray(
          coo_indices=coo_ind,
          values=val,
          dense_shape=shp,
          format="coo",
      )
  
      # create an Array instance
      array_class = getattr(ivy, class_name)
      x = np.random.random_sample(shp)
      x = ivy.array(x, dtype=val_dtype, device=on_device)
  
      # call add method
      add_method = getattr(array_class, method_name)
      res = add_method(x, sparse_inst)
  
      # make sure the result is an Array instance
      assert isinstance(res, array_class)
  
file_path: ivy/ivy_tests/test_ivy/test_functional/test_experimental/test_core/test_sparse_array.py
imports: from hypothesis import strategies
  import ivy
  import numpy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_method
label_desc: Use image node_id 6 for calling a global function with example usage: test_array_add_sparse(sparse_data, method_name, class_name, on_device) without return types