def is_purine(nucleotide, allow_extended_nucleotides=False):
    """Is the nucleotide a purine"""
    if not allow_extended_nucleotides and nucleotide not in STANDARD_NUCLEOTIDES:
        raise ValueError(
            "{} is a non-standard nucleotide, neither purine or pyrimidine".format(nucleotide))
    return nucleotide in PURINE_NUCLEOTIDES
Is the nucleotide a purine