def complement(base):
    """
    Return the complementary DNA base
    """
    complements = {"A": "T", "T": "A", "G": "C", "C": "G"}
    try:
        return complements[base]
    except KeyError:
        raise ValueError("Invalid DNA base. Must be uppercase ATGC")