code: def filter_common_titles(
      merged_blocks: List[FullyMergedBlock],
  ) -> List[FullyMergedBlock]:
      titles = []
      for i, block in enumerate(merged_blocks):
          if block.block_type in ["Title", "Section-header"]:
              text = block.text
              if text.strip().startswith("#"):
                  text = re.sub(r"#+", "", text)
              text = text.strip()
              # Remove page numbers from start/end
              text = replace_leading_trailing_digits(text, "").strip()
              titles.append((text, i))
  
      bad_block_ids = find_overlap_elements(titles)
  
      new_blocks = []
      for i, block in enumerate(merged_blocks):
          if i in bad_block_ids:
              continue
          new_blocks.append(block)
  
      return new_blocks
  
file_path: pdf-to-markdown/marker/cleaners/headers.py
imports: import re
  from collections import Counter, defaultdict
  from itertools import chain
  from thefuzz import fuzz
  from sklearn.cluster import DBSCAN
  import numpy
  from marker.schema import Page, FullyMergedBlock
  from typing import List, Tuple
label_desc: Use image node_id 6 for calling a global function with example usage: filter_common_titles(merged_blocks) and returns: new_blocks