code: def cleanup_fractions(s):
      #  evaludate  fractions when preceded by another number
      pat = re.compile(
          r"(\d+)(?: | and |-)+(<num>|\s)*(\d+)\s*\/\s*(\d+)",
          flags=re.IGNORECASE,
      )
      m = re.search(pat, s)
      if m is not None:
  
          def _repl_frac_cleanup(m):
              return str(
                  float(m.group(1))
                  + (float(m.group(3)) / float(m.group(4)))
              )
  
          s = re.sub(pat, _repl_frac_cleanup, s)
  
      # fix unpreceded fractions
      s = re.sub(r"(?:(?<=^)|(?<=[^\w)]))\/(\d+)", r"1/\1", s)
      s = re.sub(r"(?<=[a-zA-Z])\/(\d+)", r"1/\1", s)
      return s
  
imports: import re
  from .None import consts
label_desc: Use image node_id 16 for calling a global function with example usage: cleanup_fractions(s) and returns: s, str