code: def get_length_of_text(fname: str) -> int:
      filetype = find_filetype(fname)
      if filetype == "other":
          return 0
  
      doc = pymupdf.open(fname, filetype=filetype)
      full_text = ""
      for page in doc:
          full_text += page.get_text(
              "text", sort=True, flags=settings.TEXT_FLAGS
          )
  
      return len(full_text)
  
imports: import fitz
  from marker.cleaners.table import merge_table_blocks, create_new_tables
  from marker.debug.data import dump_bbox_debug_data
  from marker.extract_text import get_text_blocks
  from marker.cleaners.headers import filter_header_footer, filter_common_titles
  from marker.cleaners.equations import replace_equations
  from marker.ordering import order_blocks
  from marker.postprocessors.editor import edit_full_text
  from marker.segmentation import detect_document_block_types
  from marker.cleaners.code import identify_code_blocks, indent_blocks
  from marker.cleaners.bullets import replace_bullets
  from marker.markdown import merge_spans, merge_lines, get_full_text
  from marker.schema import Page, BlockType
  from typing import List, Dict, Tuple, Optional
  import re
  import magic
  from marker.settings import settings
label_desc: Use image node_id 3 for calling a global function with example usage: get_length_of_text(fname) and returns: len, int