import os

import cfgtools

change_number_seats_sequence = None


def can_change_number_seats_sequence():
    # type: (...) -> bool

    global change_number_seats_sequence

    if change_number_seats_sequence is None:
        config = cfgtools.read(os.environ["LOADERCFG"])
        change_number_seats_sequence = config.find_value(
            path="Customizations.ChangeNumberSeatsSequence",
            default="false",
        )

    return change_number_seats_sequence.lower() == "true"
