code: def indent_blocks(blocks: List[Page]):
      span_counter = 0
      for page in blocks:
          for block in page.blocks:
              block_types = [
                  span.block_type
                  for line in block.lines
                  for span in line.spans
              ]
              if "Code" not in block_types:
                  continue
  
              lines = []
              min_left = 1000  # will contain x- coord of column 0
              col_width = 0  # width of 1 char
              for line in block.lines:
                  text = ""
                  min_left = min(line.bbox[0], min_left)
                  for span in line.spans:
                      if col_width == 0 and len(span.text) > 0:
                          col_width = (
                              span.bbox[2] - span.bbox[0]
                          ) / len(span.text)
                      text += span.text
                  lines.append((pymupdf.Rect(line.bbox), text))
  
              block_text = ""
              blank_line = False
              for line in lines:
                  text = line[1]
                  prefix = " " * int(
                      (line[0].x0 - min_left) / col_width
                  )
                  current_line_blank = len(text.strip()) == 0
                  if blank_line and current_line_blank:
                      # Don't put multiple blank lines in a row
                      continue
  
                  block_text += prefix + text + "\n"
                  blank_line = current_line_blank
  
              new_span = Span(
                  text=block_text,
                  bbox=block.bbox,
                  color=block.lines[0].spans[0].color,
                  span_id=f"{span_counter}_fix_code",
                  font=block.lines[0].spans[0].font,
                  block_type="Code",
              )
              span_counter += 1
              block.lines = [Line(spans=[new_span], bbox=block.bbox)]
  
imports: from marker.schema import Span, Line, Page
  import re
  from typing import List
  import fitz
label_desc: Use image node_id 4 for calling a global function with example usage: indent_blocks(blocks) without return types