def power_of_two(value: str) ->int:
    """
    Validate whether this is an integer that is a power of two.

    :param value: The config string
    :return: The integer value
    """
    value = int(value)
    if value <= 0 or value & value - 1 != 0:
        raise ValueError('Value is not a power of 2')
    return value
