code: def test_filter_sentence():
      filtered_sentences, mask = filter_sentence(sentences)
      assert filtered_sentences == ["Hello World"]
      assert mask == [True, False, False]
  
      filtered_sentences, mask = filter_sentence(
          sentences, lambda x: len(x) > 1
      )
      assert filtered_sentences == ["Hello World", "#I love Cleanlab"]
      assert mask == [True, True, False]
  
      filtered_sentences, mask = filter_sentence(
          sentences, lambda x: "#" not in x
      )
      assert filtered_sentences == ["Hello World", "A"]
      assert mask == [True, False, True]
  
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 2 for calling a global function with example usage: test_filter_sentence() without return types