def indentation_value(spaces):
    """
    Given an indentation string of spaces and tabs,
    returns the equivalent number of spaces per Python
    indentation rule.
    """
    value = 0
    for char in spaces:
        value += (8 - (value % 8)) if char == '\t' else 1
    return value