code: def numerize_fractions(s, ignore=None, bias=None):
      if ignore is None:
          ignore = []
      if bias == "ordinal":
          fractionals = regexify(
              consts.ONLY_PLURAL_FRACTIONS.keys(),
              ignore=ignore + ["quarter", "quarters"],
          )
      elif bias == "fractional":
          fractionals = regexify(
              consts.ALL_FRACTIONS.keys(), ignore=ignore
          )
      else:
          fractionals = regexify(
              consts.ALL_FRACTIONS.keys(),
              ignore=ignore + ["quarter", "quarters"],
          )
      quarters = regexify(["quarter", "quarters"], ignore=ignore)
  
      #
      pat = re.compile(
          r"a ({})(?=$|\W)".format(fractionals), flags=re.IGNORECASE
      )
      m = re.search(pat, s)
      if m is not None:
          s = re.sub(pat, _repl_all_fractions, s)
  
      #
      if bias == "fractional":
          pat = re.compile(
              r"(^|\W)({})(?=$|\W)".format(fractionals),
              flags=re.IGNORECASE,
          )
          m = re.search(pat, s)
      else:
          # Terrible hack below for variable negative lookbehind.
          pat = re.compile(
              r"(?<!the)(\W)({})(?=$|\W)".format(fractionals),
              flags=re.IGNORECASE,
          )
          pat2 = re.compile(
              r"(?<!^)(\W)({})(?=$|\W)".format(fractionals),
              flags=re.IGNORECASE,
          )
          m = re.search(pat, s)
          m2 = re.search(pat2, s)
          if not (m and m2):
              m = None
          if m is not None:
              s = re.sub(
                  pat,
                  lambda m: "/"
                  + str(consts.ALL_FRACTIONS[m.group(2).lower()]),
                  s,
                  count=1,
              )
          pat = re.compile(
              r"(^|\W)({})(?=$|\W)".format(quarters),
              flags=re.IGNORECASE,
          )
          m = re.search(pat, s)
      if m is not None:
          s = re.sub(
              pat,
              lambda m: "/"
              + str(consts.ALL_FRACTIONS[m.group(2).lower()]),
              s,
              count=1,
          )
      s = cleanup_fractions(s)
      return s
  
imports: import re
  from .None import consts
label_desc: Use image node_id 10 for calling a global function with example usage: numerize_fractions(s, ignore, bias) and returns: s