def METHOD_NAME(list_of_phases, arg_name):
    for phase in list_of_phases:
        expect(
            phase in test_status.ALL_PHASES,
            "Phase {} specified with {} argument is not a valid TestStatus phase".format(
                phase, arg_name
            ),
        )