def difference(states, predictions): # pragma: no cover
    """Computes the prediction error as difference between state and prediction.

    Args:
        states: A tensor variable or constant specifying the states of a tier.
        predictions: A tensor variable or constant specifying the predictions of
            the same tier.

    Returns:
        The prediction error between the two.
    """
    return states - predictions