{% if (targetres, CODEMETA.developmentStatus, None) in g and g.value(targetres, CODEMETA.developmentStatus).find("repostatus") != -1 %}
{% set repostatus = URIRef(g.value(targetres, CODEMETA.developmentStatus)) %}
{% set repostatus_id = repostatus.split('#')[-1] %}

{% elif (targetres, CODEMETA.developmentStatus, None) in g %}
{{ g.value(targetres, CODEMETA.developmentStatus) }}
{% elif (res, CODEMETA.developmentStatus, None) in g and g.value(res, CODEMETA.developmentStatus).find("repostatus") != -1 %}
{% set repostatus = URIRef(g.value(res, CODEMETA.developmentStatus)) %}
{% set repostatus_id = repostatus.split('#')[-1] %}

{% elif (res, CODEMETA.developmentStatus, None) in g %}
{{ g.value(res, CODEMETA.developmentStatus) }}
{% endif %}
{% if (targetres, SDO.thumbnailUrl, None) in g %}
{% for _,_, license in chain(g.triples((targetres, SDO.license, None)),g.triples((res, SDO.license, None))) %}
{% if (license, SDO.name, None) in contextgraph %}
{% elif license.startswith("http") %}
{% else %}
{% endif %}
{% endfor %}
{% for _,_, res2 in chain(g.triples((targetres, SDO.softwareHelp, None)), g.triples((res, SDO.softwareHelp, None))) %}
{% if g.value(res2, SDO.name) and g.value(res2, SDO.url) %}
{% elif g.value(res2, SDO.url) %}
{% endif %}
{% endfor %}
{% for _,_, res2 in chain(g.triples((targetres, SDO.documentation, None)), g.triples((res, SDO.documentation, None))) %}
{% if g.value(res2, SDO.name) and g.value(res2, SDO.url) %}
{% elif g.value(res2, SDO.url) %}
{% endif %}
{% endfor %}
{% for title, res2 in chain(get_triples(g, targetres, CODEMETA.referencePublication), get_triples(g, res, CODEMETA.referencePublication)) %}
{% if res2 and g.value(res2, SDO.url) %}
{% else %}
{% endif %}
{% endfor %}
{% for title, res2 in chain(get_triples(g, targetres, SDO.citation),get_triples(g, res, SDO.citation)) %}
{% if res2 and g.value(res2, SDO.url) %}
{% else %}
{% endif %}
{% endfor %}
{% for label, res2 in get_triples(g, res, CODEMETA.funding, abcsort=True) %}
{% if res2 and g.value(res2, SDO.url) %}
{% else %}
{% endif %}
{% endfor %}
{% for label, res2 in get_triples(g, targetres, SDO.funder, abcsort=True) %}
{% if res2 and g.value(res2, SDO.url) %}
{% else %}
{% endif %}
{% endfor %}