code: def to_alpha(number, format, alphabet=ALPHABET, default=_marker):
      
      match = re.match(r"^(\d+)a(\d+)d", format)
      if not match or not match.groups() or len(match.groups()) != 2:
          if default is not _marker:
              return default
          raise ValueError("Format not supported: {}".format(format))
      matches = match.groups()
      num_chars = int(matches[0])
      num_digits = int(matches[1])
      try:
          return Alphanumber(number=number, num_chars=num_chars,
                             num_digits=num_digits, alphabet=alphabet)
      except ValueError as e:
          if default is not _marker:
              return default
          raise e
docs: Returns an Alphanumber object that represents the number in accordance
      with the format specified.
      :param number: a number representation used to create the Alphanumber
      :param format: the format to use. eg. '2a3d' for 2 chars and 3 digits
      :param alphabet: alphabet to use
      :type number: int, string, Alphanumber, float
      :type format: string
      :type alphabet: string