code: def page_simple(
      page, textout, GRID, fontsize, noformfeed, skip_empty, flags
  ):
      eop = b"\n" if noformfeed else bytes([12])
      text = page.get_text("text", flags=flags)
      if not text:
          if not skip_empty:
              textout.write(eop)  # write formfeed
          return
      textout.write(text.encode("utf8", errors="surrogatepass"))
      textout.write(eop)
      return
  
imports: import argparse
  import bisect
  import os
  import sys
  import statistics
  from typing import Dict, List, Set, Tuple
  import fitz
  from fitz.fitz import TEXT_INHIBIT_SPACES, TEXT_PRESERVE_LIGATURES, TEXT_PRESERVE_WHITESPACE
label_desc: Use image node_id 16 for calling a global function with example usage: page_simple(page, textout, GRID, fontsize, noformfeed, skip_empty, flags) without return types