def plait_result(elem, result) -> bool:
    """
    Return whether an output ``result`` should be included in the output.
    ``result`` should not be empty or None, and ``attrs`` should not
    include ``{'results': 'hide'}``.
    """
    return (
        bool(result)
        and result[0] is not None
        and ("results" not in elem.attributes or elem.attributes["results"] != "hide")
    )