def mutations(node):
    """
    Get the mutations on a tree branch. Take compressed sequences from both sides
    of the branch (attached to the node), compute mutations between them, and
    expand these mutations to the positions in the real sequences.
    """
    if node.up is None:
        return []
    elif not node.tt.reconstructed_tip_sequences and node.name in node.tt.data.aln:
        return node.tt.data.differences(node.up.cseq, node.tt.data.aln[node
            .name], seq2_compressed=False)
    elif node.is_terminal() and node.name not in node.tt.data.aln:
        return []
    else:
        return node.tt.data.differences(node.up.cseq, node.cseq)
