code: def test_map_index(device, max_index):
      src = torch.tensor([2, 0, 1, 0, max_index], device=device)
      index = torch.tensor([max_index, 2, 0, 1], device=device)
  
      out, mask = map_index(src, index, inclusive=True)
      assert out.device == device
      assert mask is None
      assert out.tolist() == [1, 2, 3, 2, 0]
  
imports: import pytest
  import torch
  from torch_geometric.profile import benchmark
  from torch_geometric.testing import withCUDA, withPackage
  from torch_geometric.utils.map import map_index
label_desc: Use image node_id 1 for calling a global function with example usage: test_map_index(device, max_index) without return types