def draw_digraph(graph: iter, layout: dict=None):
    """Print given iterable of 2-uplet understood as edges"""
    import networkx as nx
    import matplotlib
    matplotlib.use('TkAgg')
    import matplotlib.pyplot as plt
    from matplotlib.lines import Line2D
    G = nx.DiGraph()
    G.add_edges_from(graph)
    graph_pos = layout or nx.shell_layout(G)
    nx.draw_networkx_nodes(G, graph_pos, node_size=1000, node_color='blue',
        alpha=0.3)
    nx.draw_networkx_edges(G, graph_pos, width=2, alpha=0.3, edge_color='green'
        )
    nx.draw_networkx_labels(G, graph_pos, font_size=12, font_family=
        'sans-serif')
    plt.show()
