code: def filter_bad_span_types(self):
      new_lines = []
      for line in self.lines:
          new_spans = []
          for span in line.spans:
              if span.block_type not in settings.BAD_SPAN_TYPES:
                  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 4 for calling the Block obj's underlying member method code with example usage: obj.filter_bad_span_types() without return types