<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_homozygous(self, individual=None):
 """This will give a boolean list corresponding to whether each individual is homozygous for the alternative allele. """

        if individual is not None:
            if isinstance(individual, str):
                individual = self.individuals[individual]
            alts = self.genotype[individual]
            return [sum(alts) == len(alts)] if sum(alts) > 0 else [False]
        else:
            return [sum(alts) == len(alts) if sum(alts) > 0 else False for i, alts in self.genotype.iteritems()]