def is_prolog_variable(json_term):
    """
    True if json_term is Prolog JSON representing a Prolog variable.  See `swiplserver.prologserver` for documentation on the Prolog JSON format.
    """
    return isinstance(json_term, str) and (
        json_term[0].isupper() or json_term[0] == "_"
    )