code: def _remove_lines_from_text(
      el, counter_inc_fn, min_num_sentences, line_delimiter="\n"
  ) -> Iterable[PageFeatures]:
      """Removes all lines from the page that do not match the given set of hashes.
  
      Process the result of a join containing a single value for 'features' and zero
      or more values for 'lines'. Each value in 'lines' is a lower-cased, hashed
      line that has been selected to keep.
  
      Args:
        el: `(string, {'pages': PageFeatures, 'lines': [string]})`, element
          containing the result of a join on key with both the page text and
          lower-cased, hashed lines to remove.
        counter_inc_fn: function, a function taking the name of a counter to be
          incremented and the (optional) amount.
        min_num_sentences: int, the minimum number of sentences a page needs to not
          be skipped.
        line_delimiter: str, the delimiter used to separate and join lines.
  
      Yields:
        The page features with lines removed from text.
      """
      url, join_values = el
      pages = join_values["pages"]
  
      assert len(pages) == 1, "Invalid page count (%d) for %s" % (
          len(pages),
          url,
      )
      page = pages[0]
      text = page.text
      lines_to_keep = set(join_values["lines"])
      new_lines = []
      hashed_lines = set()
      for line in text.split(line_delimiter):
          hashed_line = _hash_text(line.strip().lower())
          if hashed_line not in lines_to_keep:
              counter_inc_fn("line-filtered:global_duplicate")
          elif hashed_line in hashed_lines:
              counter_inc_fn("line-filtered:local_duplicate")
          else:
              counter_inc_fn("line-passed")
              new_lines.append(line)
              hashed_lines.add(hashed_line)
      new_text = line_delimiter.join(new_lines)
      if not new_text:
          counter_inc_fn("filtered:empty")
          return
      if (
          min_num_sentences
          and len(_get_sentences(new_text)) < min_num_sentences
      ):
          counter_inc_fn("filtered:too_few_sentences")
          return
      counter_inc_fn("passed")
      yield dataclasses.replace(page, text=new_text)
  
imports: import dataclasses
  import functools
  import gzip
  import hashlib
  import heapq
  import io
  import re
  import threading
  from typing import Collection, Iterable, Mapping, Optional, Sequence, Tuple
  from absl import logging
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 11 for calling a global function with example usage: _remove_lines_from_text(el, counter_inc_fn, min_num_sentences, line_delimiter) without return types