code: def to_decimal(alpha_number, alphabet=ALPHABET, default=_marker):
      
      num = api.to_int(alpha_number, default=None)
      if num is not None:
          return num
  
      alpha_number = str(alpha_number)
      regex = re.compile(r"([A-Z]+)(\d+)", re.IGNORECASE)
      matches = re.findall(regex, alpha_number)
      if not matches:
          if default is not _marker:
              return default
          raise ValueError("Not a valid alpha number: {}".format(alpha_number))
  
      alpha = matches[0][0]
      number = int(matches[0][1])
      max_num = 10 ** len(matches[0][1]) - 1
      len_alphabet = len(alphabet)
      for pos_char, alpha_char in enumerate(reversed(alpha)):
          index_char = alphabet.find(alpha_char)
          number += (index_char * max_num * len_alphabet ** pos_char)
  
      return number
docs: Converts an alphanumeric code (e.g AB12) to an integer
      :param alpha_number: representation of an alphanumeric code
      :param alphabet: alphabet to use when alpha_number is a non-int string
      :type number: int, string, Alphanumber, float
      :type alphabet: string