<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def detect_build(snps):
 """ Detect build of SNPs. Use the coordinates of common SNPs to identify the build / assembly of a genotype file that is being loaded. Notes ----- rs3094315 : plus strand in 36, 37, and 38 rs11928389 : plus strand in 36, minus strand in 37 and 38 rs2500347 : plus strand in 36 and 37, minus strand in 38 rs964481 : plus strand in 36, 37, and 38 rs2341354 : plus strand in 36, 37, and 38 Parameters snps : pandas.DataFrame SNPs to add Returns ------- int detected build of SNPs, else None References ..[1] Yates et. al. (doi:10.1093/bioinformatics/btu613), http://europepmc.org/search/?query=DOI:10.1093/bioinformatics/btu613 ..[2] Zerbino et. al. (doi.org/10.1093/nar/gkx1098), https://doi.org/10.1093/nar/gkx1098 ..[3] Sherry ST, Ward MH, Kholodov M, Baker J, Phan L, Smigielski EM, Sirotkin K. dbSNP: the NCBI database of genetic variation. Nucleic Acids Res. 2001 Jan 1;29(1):
308-11. ..[4] Database of Single Nucleotide Polymorphisms (dbSNP). Bethesda (MD):
 National Center for Biotechnology Information, National Library of Medicine. dbSNP accession: rs3094315, rs11928389, rs2500347, rs964481, and rs2341354 (dbSNP Build ID: 151). Available from: http://www.ncbi.nlm.nih.gov/SNP/ """


    def lookup_build_with_snp_pos(pos, s):
        try:
            return s.loc[s == pos].index[0]
        except:
            return None

    build = None

    rsids = ["rs3094315", "rs11928389", "rs2500347", "rs964481", "rs2341354"]
    df = pd.DataFrame(
        {
            36: [742429, 50908372, 143649677, 27566744, 908436],
            37: [752566, 50927009, 144938320, 27656823, 918573],
            38: [817186, 50889578, 148946169, 27638706, 983193],
        },
        index=rsids,
    )

    for rsid in rsids:
        if rsid in snps.index:
            build = lookup_build_with_snp_pos(snps.loc[rsid].pos, df.loc[rsid])

        if build is not None:
            break

    return build