def _impaired_or_not(z_score, cutoff):
    """ Dichotimize z-score by applying a cutoff

    :param z_score: the z-score, i.e. performance relative to a reference population
    :param cutoff: the cut-off to decide impaired (<=) or preserved (>) on the cognitive domain
    :return: 1 if impaired, 0 if preserved
    """
    if z_score <= cutoff:
        return 1
    else:
        return 0