def example_to_html(example):
    """
    Examples can use `literalExample` or `literalExpression` fields for raw text so we can extract that here.
    """
    if isinstance(example, dict):
        if example.get("_type") in ["literalExample", "literalExpression"]:
            return example["text"]
    return example