code: def test_select():
      src = torch.randn(5, 3)
      index = torch.tensor([0, 2, 4])
      mask = torch.tensor([True, False, True, False, True])
  
      out = select(src, index, dim=0)
      assert torch.equal(out, src[index])
      assert torch.equal(out, select(src, mask, dim=0))
      assert torch.equal(
          out, torch.tensor(select(src.tolist(), index, dim=0))
      )
      assert torch.equal(
          out, torch.tensor(select(src.tolist(), mask, dim=0))
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_select() without return types