def make_edges(nodes, directed=True):
    """
    Create an edge tuple from two nodes either directed
    (first to second) or undirected (two edges, both ways).
    
    :param nodes:    nodes to create edges for
    :type nodes:     :py:list, py:tuple
    :param directed: create directed edge or not
    :type directed:  bool
    """
    
    edges = [tuple(nodes)]
    if not directed:
        edges.append(nodes[::-1])
    
    return edges