def validate_comp_op_for_sim_measure(comp_op, sim_measure_type):
    """Check if the comparison operator is valid for the sim_measure_type."""
    if sim_measure_type == 'EDIT_DISTANCE':
        if comp_op not in ['<=', '<', '=']:
            raise AssertionError('Comparison operator not supported. ' +
                'Supported comparison operators for ' + sim_measure_type +
                ' are <=, < and =.')
    elif comp_op not in ['>=', '>', '=']:
        raise AssertionError('Comparison operator not supported. ' +
            'Supported comparison operators for ' + sim_measure_type +
            ' are >=, > and =.')
    return True
