code: def test_merge_probs_with_normalization():
      # Ignore probabilities for class/entity 0
      norm_maps = [-1, 1, 0, 1]
      merged_probs = merge_probs(pred_probs[0], norm_maps)
      expected = np.array([[0.0, 1.0], [0.5, 0.5]])
      assert np.allclose(expected, merged_probs)
  
      merged_probs = merge_probs(pred_probs[1], norm_maps)
      expected = np.array([[1.0, 0.0], [1 / 9, 8 / 9], [1 / 9, 8 / 9]])
      assert np.allclose(expected, merged_probs)
  
      merged_probs = merge_probs(pred_probs[2], norm_maps)
      expected = np.array([[8 / 9, 1 / 9]])
  
      # Ignore probabilities for class/entity 1
      norm_maps = [0, -1, 0, 1]
      merged_probs = merge_probs(pred_probs[0], norm_maps)
      expected = np.array([[1.0, 0.0], [1.0, 0.0]])
      assert np.allclose(expected, merged_probs)
  
      merged_probs = merge_probs(pred_probs[1], norm_maps)
      expected = np.array([[1.0, 0.0], [1.0, 0.0], [1.0, 0.0]])
      assert np.allclose(expected, merged_probs)
  
      merged_probs = merge_probs(pred_probs[2], norm_maps)
      expected = np.array([[1.0, 0.0]])
      assert np.allclose(expected, merged_probs)
  
imports: from cleanlab.internal.token_classification_utils import get_sentence, filter_sentence, process_token, mapping, merge_probs, color_sentence, _replace_sentence
  from cleanlab.token_classification.filter import find_label_issues
  from cleanlab.token_classification.rank import get_label_quality_scores, issues_from_scores, _softmin_sentence_score
  from cleanlab.token_classification.summary import display_issues, common_label_issues, filter_by_token
  import numpy
  import pandas
  import pytest
  import warnings
label_desc: Use image node_id 6 for calling a global function with example usage: test_merge_probs_with_normalization() without return types