code: def test_backward(test, device):
      src = tensor(test["src"], torch.double, device)
      src.requires_grad_()
      index = tensor(test["index"], torch.long, device)
      indptr = tensor(test["indptr"], torch.long, device)
  
      assert gradcheck(gather_csr, (src, indptr, None)) is True
      assert gradcheck(gather_coo, (src, index, None)) is True
  
file_path: pytorch_scatter/test/test_gather.py
imports: from itertools import product
  import pytest
  import torch
  from torch.autograd import gradcheck
  from torch_scatter import gather_coo, gather_csr
  from torch_scatter.testing import devices, dtypes, tensor
label_desc: Use image node_id 2 for calling a global function with example usage: test_backward(test, device) without return types