code: def test_homogeneous_num_neighbors():
      with pytest.raises(
          ValueError, match="'default' must be set to 'None'"
      ):
          num_neighbors = NumNeighbors([25, 10], default=[-1, -1])
  
      num_neighbors = NumNeighbors([25, 10])
      assert (
          str(num_neighbors)
          == "NumNeighbors(values=[25, 10], default=None)"
      )
  
      assert num_neighbors.get_values() == [25, 10]
      assert num_neighbors.__dict__["_values"] == [25, 10]
      assert num_neighbors.get_values() == [25, 10]  # Test caching.
  
      assert num_neighbors.get_mapped_values() == [25, 10]
      assert num_neighbors.__dict__["_mapped_values"] == [25, 10]
      assert num_neighbors.get_mapped_values() == [
          25,
          10,
      ]  # Test caching.
  
      assert num_neighbors.num_hops == 2
      assert num_neighbors.__dict__["_num_hops"] == 2
      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 1 for calling a global function with example usage: test_homogeneous_num_neighbors() without return types