code: def test_index_select():
      x = torch.randn(3, 5)
      index = torch.tensor([0, 2])
      assert torch.equal(index_select(x, index), x[index])
      assert torch.equal(index_select(x, index, dim=-1), x[..., index])
  
imports: import pytest
  import torch
  from torch_geometric.loader.utils import index_select
label_desc: Use image node_id 1 for calling a global function with example usage: test_index_select() without return types