def span_pred_key(node):
    """
    For use as a node_key in SortDictDmrs.
    This sorts nodes by: cfrom (ascending), cto (descending), predstring (ascending)
    """
    return (node.cfrom, -node.cto, str(node.pred))