def get_edges(source_label, target_label, edge_label, data=False):
    """Generate query for getting all the edges of the graph.

    Parameters
    ----------
    source_label : optional
        Label of the source nodes to match
    target_label : optional
        Label of the target nodes to match
    edge_label : iterable, optional
        Label of the edges to match
    """
    if data:
        query = (
            """MATCH (n:{})-[r:{}]->(m:{})
RETURN n.id as source_id, m.id as target_id, properties(r) as attrs
"""
            .format(source_label, edge_label, target_label))
    else:
        query = (
            'MATCH (n:{})-[r:{}]->(m:{})\nRETURN n.id as source_id, m.id as target_id\n'
            .format(source_label, edge_label, target_label))
    return query
