def set_chromosomes(self, chromosomes=None):
if chromosomes and chromosomes in valid_chromosomes:<EOL><INDENT>self.chromosomes = chromosomes<EOL><DEDENT>else:<EOL><INDENT>self.chromosomes = random.choice([XX, XY])<EOL><DEDENT>
This model uses the XY sex-determination system. Sex != gender.
        Assign either XX or XY randomly with a 50/50 chance of each, unless
        <chromosomes> are passed as an argument.