code: def test_non_contiguous(test, reduce, dtype, device):
      src = tensor(test["src"], dtype, device)
      index = tensor(test["index"], torch.long, device)
      dim = test["dim"]
      expected = tensor(test[reduce], dtype, device)
  
      if src.dim() > 1:
          src = src.transpose(0, 1).contiguous().transpose(0, 1)
      if index.dim() > 1:
          index = index.transpose(0, 1).contiguous().transpose(0, 1)
  
      out = getattr(torch_scatter, "scatter_" + reduce)(src, index, dim)
      if isinstance(out, tuple):
          out, arg_out = out
          arg_expected = tensor(
              test["arg_" + reduce], torch.long, device
          )
          assert torch.all(arg_out == arg_expected)
      assert torch.all(out == expected)
  
file_path: pytorch_scatter/test/test_scatter.py
imports: from itertools import product
  import pytest
  import torch
  import torch_scatter
  from torch.autograd import gradcheck
  from torch_scatter.testing import devices, dtypes, reductions, tensor
label_desc: Use image node_id 4 for calling a global function with example usage: test_non_contiguous(test, reduce, dtype, device) without return types