code: def add_block_types(self, page_block_types):
      if len(page_block_types) != len(self.get_all_lines()):
          print(
              f"Warning: Number of detected lines {len(page_block_types)} does not match number of lines {len(self.get_all_lines())}"
          )
  
      i = 0
      for block in self.blocks:
          for line in block.lines:
              if i < len(page_block_types):
                  line_block_type = page_block_types[i].block_type
              else:
                  line_block_type = "Text"
              i += 1
              for span in line.spans:
                  span.block_type = line_block_type
  
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 Page obj's underlying member method code with example usage: obj.add_block_types(page_block_types) without return types