def var_is_rare(variant_data, threshold):
    """Check if variant is rare, as defined by the passed cutoff
    :param variant_data: A GeminiRow for a single variant.
    :type variant_data: GeminiRow.
    :param threshold: Allele frequency rarity threshold.
    :type threshold: float.
    :returns:  bool -- True or False.
    """

    if variant_data['in_esp'] != 0 or variant_data['in_1kg'] != 0 or variant_data['in_exac'] != 0:
        if variant_data['max_aaf_all'] > threshold:
            return False
        else:
            return True
    else:
        return True