code: def test_mask_to_index():
      mask = torch.tensor([False, True, False, True, False, True])
  
      index = mask_to_index(mask)
      assert index.tolist() == [1, 3, 5]
  
imports: import torch
  from torch_geometric.utils import index_to_mask, mask_select, mask_to_index
label_desc: Use image node_id 3 for calling a global function with example usage: test_mask_to_index() without return types