def _normalize_site_motif(motif):
    """Normalize the PSP site motif to all caps with no underscores and return
    the preprocessed motif sequence and the position of the target residue
    in the motif (zero-indexed)."""
    no_underscores = motif.replace('_', '')
    offset = motif.find(no_underscores)
    respos = 7 - offset
    return (no_underscores.upper(), respos)