def get_string_value(value_format, vo):
    """Return a string from a value or object dictionary based on the value format."""
    if "value" in vo:
        return vo["value"]
    elif value_format == "label":
        # Label or CURIE (when no label)
        return vo.get("label") or vo["id"]
    elif value_format == "curie":
        # Always the CURIE
        return vo["id"]
    # IRI or CURIE (when no IRI, which shouldn't happen)
    return vo.get("iri") or vo["id"]