def is_heterozygous(self, individual=None):
if individual is not None:<EOL><INDENT>if isinstance(individual, str):<EOL><INDENT>individual = self.individuals[individual]<EOL><DEDENT>alts = self.genotype[individual]<EOL>return [sum(alts) != len(alts)] if sum(alts) > <NUM_LIT:0> else [False]<EOL><DEDENT>else:<EOL><INDENT>return [sum(alts) != len(alts) if sum(alts) > <NUM_LIT:0> else False for i, alts in self.genotype.iteritems()]<EOL><DEDENT>
This will give a boolean list corresponding to whether each individual
        is heterozygous for the alternative allele.