def findInEdges(nodeNum, edges, att=None):
    """
    Find the specified node index in either node_i or node_j columns of input edges df.

    Parameters
    ----------
    nodeNum : int
        This is the node index not protein index.
    edges : pandas dataframe
        Dataframe in which to search for node.

    Returns
    -------
    pandas dataframe

    """
    edges = edges.copy()
    if att is not None:
        return edges[(edges.attribute == att) & ((edges.node_i == nodeNum) | (edges.node_j == nodeNum))]
    else:
        return edges[(edges.node_i == nodeNum) | (edges.node_j == nodeNum)]