def append_node_bin(dag, op, arg1, arg2):
    """This function generates and appends a node, which corresponds to a binary operator application, to the DAG.

    Returns: the node key.
    """
    k = '(' + arg1 + op + arg2 + ')'
    if k not in dag.keys():
        dag[k] = op, arg1, arg2
    return k
