def Integer(value, default=None):
    """Get integer value from the provided value.
    If None, default is returned
    """
    if value is None:
        return default
    value = value.lower()
    if value.startswith('0x'):
        return int(value[2:], 16)
    elif value.startswith('0b'):
        value = value.replace('x', '0')[2:]
        return int(value, 2)
    elif value.startswith('#'):
        value = value.replace('x', '0')[1:]
        return int(value, 2)
    else:
        return int(value)
