<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _double_single_alleles(df, chrom):
 """ Double any single alleles in the specified chromosome. Parameters df : pandas.DataFrame SNPs chrom : str chromosome of alleles to double Returns ------- df : pandas.DataFrame SNPs with specified chromosome's single alleles doubled """

        # find all single alleles of the specified chromosome
        single_alleles = np.where(
            (df["chrom"] == chrom) & (df["genotype"].str.len() == 1)
        )[0]

        # double those alleles
        df.ix[single_alleles, "genotype"] = df.ix[single_alleles, "genotype"] * 2

        return df