code: def test_scatter_backward(reduce, device):
      src = torch.randn(8, 100, 16, device=device, requires_grad=True)
      index = torch.randint(0, 8, (100,), device=device)
  
      out = scatter(src, index, dim=1, reduce=reduce)
  
      assert src.grad is None
      out.mean().backward()
      assert src.grad is not None
  
file_path: pytorch_geometric/test/utils/test_scatter.py
imports: from itertools import product
  import pytest
  import torch
  import torch_geometric.typing
  from torch_geometric.profile import benchmark
  from torch_geometric.testing import withCUDA, withPackage
  from torch_geometric.utils import group_argsort, scatter
  from torch_geometric.utils._scatter import scatter_argmax
label_desc: Use image node_id 3 for calling a global function with example usage: test_scatter_backward(reduce, device) without return types