code: def filter_spans(self, bad_span_ids):
      new_lines = []
      for line in self.lines:
          new_spans = []
          for span in line.spans:
              if not span.span_id in bad_span_ids:
                  new_spans.append(span)
          line.spans = new_spans
          if len(new_spans) > 0:
              new_lines.append(line)
      self.lines = new_lines
  
imports: from collections import Counter
  from typing import List, Optional, Tuple
  from pydantic import BaseModel, field_validator
  import ftfy
  from marker.bbox import boxes_intersect_pct, multiple_boxes_intersect
  from marker.settings import settings
label_desc: Use image node_id 3 for calling the Block obj's underlying member method code with example usage: obj.filter_spans(bad_span_ids) without return types