def _number_convert(match):
    """
    Convert number with an explicit base
    to a decimal integer value:
    - 0x0000 -> hexadecimal
    - 16'h0000 -> hexadecimal
    - 0b0000 -> binary
    - 3'b000 -> binary
    - otherwise -> decimal
    """
    prefix, base, number = match.groups()
    if prefix is not None:
        return str(match.group(0))
    if base in "xh":
        return str(int(number, 16))
    if base == "b":
        return str(int(number, 2))
    return str(int(number, 10))