code: def test_neighbour_table(dim, spacing):
      """Test the table for surface score function."""
      spacing = dim * (spacing,)
      ref_table, ref_kernel = get_code_to_measure_table(spacing)
      table, kernel = get_neighbour_tables(spacing)
  
      assert torch.allclose(ref_table.float(), table)
      assert torch.allclose(ref_kernel, kernel)
  
file_path: torchmetrics/tests/unittests/segmentation/test_utils.py
imports: import pytest
  import torch
  from monai.metrics.utils import get_code_to_measure_table
  from monai.metrics.utils import get_mask_edges
  from monai.metrics.utils import get_surface_distance
  from scipy.ndimage import binary_erosion
  from scipy.ndimage import distance_transform_cdt
  from scipy.ndimage import distance_transform_edt
  from scipy.ndimage import generate_binary_structure
  from torchmetrics.functional.segmentation.utils import binary_erosion, distance_transform, generate_binary_structure, get_neighbour_tables, mask_edges, surface_distance
label_desc: Use image node_id 5 for calling a global function with example usage: test_neighbour_table(dim, spacing) without return types