code: def test_heterogeneous_num_neighbors_dict_and_default():
      num_neighbors = NumNeighbors({("A", "B"): [25, 10]}, default=[-1])
      with pytest.raises(
          ValueError, match="hops must be the same across all"
      ):
          values = num_neighbors.get_values([("A", "B"), ("B", "A")])
  
      num_neighbors = NumNeighbors(
          {("A", "B"): [25, 10]}, default=[-1, -1]
      )
  
      values = num_neighbors.get_values([("A", "B"), ("B", "A")])
      assert values == {("A", "B"): [25, 10], ("B", "A"): [-1, -1]}
  
      values = num_neighbors.get_mapped_values([("A", "B"), ("B", "A")])
      assert values == {"A__to__B": [25, 10], "B__to__A": [-1, -1]}
  
      assert num_neighbors.num_hops == 2
  
file_path: pytorch_geometric/test/sampler/test_sampler_base.py
imports: import pytest
  import torch
  from torch_geometric.sampler.base import HeteroSamplerOutput, NumNeighbors, SamplerOutput
  from torch_geometric.testing import get_random_edge_index
  from torch_geometric.utils import is_undirected
label_desc: Use image node_id 3 for calling a global function with example usage: test_heterogeneous_num_neighbors_dict_and_default() without return types