def check_X_dominant(variant, family, strict=False):
    """
    Check if the variant follows the x linked dominant (XD) pattern of 
    inheritance in this family.
    A variant is following the XD pattern if:
    
    Healthy:
        - Can not be homozygote alternative
        - Healthy females can be heterozygotes. This is possible since there 
            are several documented diseases where only one allele at a time is
            expressed during development.
        - If no call we can not exclude XR
        if strict:
            - Have to be homozygote reference (or heterozygote womens).
            - No call will return False
    
    Affected:
        - Have to be heterozygote.
        - If no call we can not exclude AR
        if strict:
            - Have to be heterozygote or homozygote(for males)
            - No call will return false
    
    No affection status:
            We can not tell if variant follows the model or not.
    
    Args:
        variant: variant dictionary.
        family: A family object with the individuals
        strict: A boolean that tells if strict analyzis should be performed.
    
    Return:
        bool: depending on if the model is followed in these indivduals
    
    """
    for individual in family.individuals:
        # Get the genotype for this variant for this individual
        individual_genotype = variant['genotypes'][individual]
        
        if strict:
            if not individual_genotype.genotyped:
                return False
        # The case where the individual is healthy
        if family.individuals[individual].healthy:
        # Healthy womans can be carriers but not homozygote:
            if individual_genotype.genotyped:
                if family.individuals[individual].sex == 2:
                    if individual_genotype.homo_alt:
                        return False
                # Males can not carry the variant:
                elif family.individuals[individual].sex == 1:
                    if individual_genotype.has_variant:
                        return False
        
        # The case when the individual is sick
        elif family.individuals[individual].affected:
        # If the individual is sick and homozygote ref it 
        # can not be x-linked-dominant
            if individual_genotype.genotyped:
                if individual_genotype.homo_ref:
                    return False
    return True