code: def check_label_map(mapping):
      assert (
          mapping.indices_map_to_data_type == "CIFTI_INDEX_TYPE_LABELS"
      )
      assert len(list(mapping.named_maps)) == 2
  
      for expected, named_map in zip(scalars, mapping.named_maps):
          assert named_map.map_name == expected[0]
          if len(expected[1]) == 0:
              assert named_map.metadata is None
          else:
              assert named_map.metadata == expected[1]
  
imports: import numpy
  import pytest
  import nibabel
  from nibabel import cifti2
  from nibabel.tmpdirs import InTemporaryDirectory
  from ...testing import assert_array_equal, clear_and_catch_warnings, error_warnings, suppress_warnings
label_desc: Use image node_id 8 for calling a global function with example usage: check_label_map(mapping) without return types