def METHOD_NAME(attn, src_sent, tgt_sent, pad, eos):
    r"""
    @deprecated
    There is no usage in this project, should be removed.
    """
    tgt_valid = (((tgt_sent != pad) &  # noqa
                  (tgt_sent != eos)).nonzero(as_tuple=False).squeeze(dim=-1))
    src_invalid = (((src_sent == pad) |  # noqa
                    (src_sent == eos)).nonzero(as_tuple=False).squeeze(dim=-1))
    src_token_to_word = get_token_to_word_mapping(src_sent, [eos, pad])
    tgt_token_to_word = get_token_to_word_mapping(tgt_sent, [eos, pad])
    alignment = []
    if len(tgt_valid) != 0 and len(src_invalid) < len(src_sent):
        attn_valid = attn[tgt_valid]
        attn_valid[:, src_invalid] = float('-inf')
        _, src_indices = attn_valid.max(dim=1)
        for tgt_idx, src_idx in zip(tgt_valid, src_indices):
            alignment.append((
                src_token_to_word[src_idx.item()] - 1,
                tgt_token_to_word[tgt_idx.item()] - 1,
            ))
    return alignment