code: def test_contour_labeled_with_reduced_labels_count():
      # Load a 3D label map (segmentation of a frog's tissue)
      label_map = examples.download_frog_tissue()
  
      # Extract surface for each label
      mesh = label_map.contour_labeled(n_labels=2)
      # this somehow mutates the object... also the n_labels is likely not correct
  
      assert "BoundaryLabels" in mesh.cell_data
      assert np.max(mesh["BoundaryLabels"][:, 0]) == 2
  
file_path: pyvista/tests/core/test_imagedata_filters.py
imports: import numpy
  import pytest
  import pyvista
  from pyvista import examples
label_desc: Use image node_id 3 for calling a global function with example usage: test_contour_labeled_with_reduced_labels_count() without return types