def out_labels(G, q):
    """Returns a list of each of the labels appearing on the edges
    starting at `q` in `G`.

    Parameters
    ----------
    G : labeled graph
    q : vertex in `G`

    Examples
    --------
    >>> G = nx.MultiDiGraph()
    >>> G.add_edge(1, 2, label="a")
    >>> G.add_edge(1, 3, label="a")
    >>> G.add_edge(1, 1, label="b")
    >>> sd.out_labels(G, 1)
    ['a', 'a', 'b']

    """
    return [label for (_, _, label) in G.out_edges(q, data="label")]