Helper function to convert the given input price into integers (cents
        count). :obj:`int`, :obj:`float` and :obj:`str` are supported

        :param variant: Price
        :param re.compile regex: Regex to convert str into price. The re should
             contain two named groups `euro` and `cent`
        :param re.compile short_regex: Short regex version (no cent part)
             group `euro` should contain a valid integer.
        :param re.compile none_regex: Regex to detect that no value is provided
             if the input data is str, the normal regex do not match and this
             regex matches `None` is returned.
        :rtype: int/None

def convertPrice(variant, regex=None, short_regex=None, none_regex=none_price_regex):
    ''' Helper function to convert the given input price into integers (cents
        count). :obj:`int`, :obj:`float` and :obj:`str` are supported

        :param variant: Price
        :param re.compile regex: Regex to convert str into price. The re should
             contain two named groups `euro` and `cent`
        :param re.compile short_regex: Short regex version (no cent part)
             group `euro` should contain a valid integer.
        :param re.compile none_regex: Regex to detect that no value is provided
             if the input data is str, the normal regex do not match and this
             regex matches `None` is returned.
        :rtype: int/None'''
    if isinstance(variant, int) and not isinstance(variant, bool):
        return variant
    elif isinstance(variant, float):
        return round(variant * 100)
    elif isinstance(variant, str):
        match = (regex or default_price_regex).search(variant) \
            or (short_regex or short_price_regex).match(variant)
        if not match:
            if none_regex and none_regex.match(variant):
                return None
            raise ValueError('Could not extract price: {0}'.format(variant))
        return int(match.group('euro')) * 100 + \
            int(match.groupdict().get('cent', '').ljust(2, '0'))
    else:
        raise TypeError('Unknown price type: {0!r}'.format(variant))