code: def alphanum_ratio(text):
      text = text.replace(" ", "")
      text = text.replace("\n", "")
      alphanumeric_count = sum([1 for c in text if c.isalnum()])
  
      if len(text) == 0:
          return 1
  
      ratio = alphanumeric_count / len(text)
      return ratio
  
imports: from typing import Optional
  from nltk import wordpunct_tokenize
  from spellchecker import SpellChecker
  from marker.settings import settings
  import re
label_desc: Use image node_id 3 for calling a global function with example usage: alphanum_ratio(text) and returns: ratio, int