code: def test_L2_knn(device, k):
      lhs = torch.randn(10, 16, device=device)
      rhs = torch.randn(100, 16, device=device)
  
      index = L2KNNIndex(rhs)
      assert index.get_emb().device == device
      assert torch.equal(index.get_emb(), rhs)
  
      out = index.search(lhs, k)
      assert out.score.device == device
      assert out.index.device == device
      assert out.score.size() == (10, k)
      assert out.index.size() == (10, k)
  
      mat = torch.linalg.norm(
          lhs.unsqueeze(1) - rhs.unsqueeze(0), dim=-1
      ).pow(2)
      score, index = mat.sort(dim=-1)
  
      assert torch.allclose(out.score, score[:, :k])
      assert torch.equal(out.index, index[:, :k])
  
imports: import pytest
  import torch
  from torch_geometric.nn import L2KNNIndex, MIPSKNNIndex
  from torch_geometric.testing import withCUDA, withPackage
label_desc: Use image node_id 1 for calling a global function with example usage: test_L2_knn(device, k) without return types