src/pybel/struct/summary/provenance.py
def iterate_citation_identifiers(graph, prefix: str):
    """Iterate over all citation identifiers with the given prefix in a graph.

    :param graph: A BEL graph
    :param prefix: The citation prefix to keep
    :return: An iterator over the PubMed identifiers in the graph
    """
    predicate = CITATION_PREDICATES.get(prefix)
    if predicate is None:
        raise ValueError(f'Invalid citation prefix: {prefix}')

    return (
        data[CITATION][IDENTIFIER].strip()
        for _, _, data in graph.edges(data=True)
        if predicate(data)
    )
Iterate over all citation identifiers with the given prefix in a graph.

    :param graph: A BEL graph
    :param prefix: The citation prefix to keep
    :return: An iterator over the PubMed identifiers in the graph
    
Iterate over all citation identifiers with the given prefix in a graph.
Iterate over all citation identifiers with the given prefix in a graph .
def iterate_citation_identifiers(graph, prefix: str):
    predicate = CITATION_PREDICATES.get(prefix)
    if predicate is None:
        raise ValueError(f'Invalid citation prefix: {prefix}')
    return (
        data[CITATION][IDENTIFIER].strip()
        for _, _, data in graph.edges(data=True)
        if predicate(data)
    )
def iterate_citation_identifiers ( graph , prefix : str ) : predicate = CITATION_PREDICATES . get ( prefix ) if predicate is None : raise ValueError ( f'Invalid citation prefix: {prefix}' ) return ( data [ CITATION ] [ IDENTIFIER ] . strip ( ) for _ , _ , data in graph . edges ( data = True ) if predicate ( data ) )
Iterate over all citation identifiers with the given prefix in a graph.
Iterate over all citation identifiers with the given prefix in a graph .
"""Iterate over all citation identifiers with the given prefix in a graph.

    :param graph: A BEL graph
    :param prefix: The citation prefix to keep
    :return: An iterator over the PubMed identifiers in the graph
    """
An iterator over the PubMed identifiers in the graph
An iterator over the PubMed identifiers in the graph
graph
A BEL graph
A BEL graph
prefix
str
The citation prefix to keep
The citation prefix to keep