src/pybel/tokens.py
def _simple_po_to_dict(tokens) -> BaseAbundance:
    """Convert a simple named entity to a DSL object.

    :type tokens: ParseResult
    """
    dsl = FUNC_TO_DSL.get(tokens[FUNCTION])
    if dsl is None:
        raise ValueError('invalid tokens: {}'.format(tokens))

    concept = tokens[CONCEPT]
    return dsl(
        namespace=concept[NAMESPACE],
        name=concept.get(NAME),
        identifier=concept.get(IDENTIFIER),
        xrefs=tokens.get(XREFS),
    )
Convert a simple named entity to a DSL object.

    :type tokens: ParseResult
    
Convert a simple named entity to a DSL object.
Convert a simple named entity to a DSL object .
def _simple_po_to_dict(tokens) -> BaseAbundance:
    dsl = FUNC_TO_DSL.get(tokens[FUNCTION])
    if dsl is None:
        raise ValueError('invalid tokens: {}'.format(tokens))
    concept = tokens[CONCEPT]
    return dsl(
        namespace=concept[NAMESPACE],
        name=concept.get(NAME),
        identifier=concept.get(IDENTIFIER),
        xrefs=tokens.get(XREFS),
    )
def _simple_po_to_dict ( tokens ) -> BaseAbundance : dsl = FUNC_TO_DSL . get ( tokens [ FUNCTION ] ) if dsl is None : raise ValueError ( 'invalid tokens: {}' . format ( tokens ) ) concept = tokens [ CONCEPT ] return dsl ( namespace = concept [ NAMESPACE ] , name = concept . get ( NAME ) , identifier = concept . get ( IDENTIFIER ) , xrefs = tokens . get ( XREFS ) , )
Convert a simple named entity to a DSL object.
Convert a simple named entity to a DSL object .
"""Convert a simple named entity to a DSL object.

    :type tokens: ParseResult
    """
tokens