def _prediction_function(model_object, predictor_matrix_in_list):
    """Prediction function.

    This function satisfies the requirements for the input `prediction_function`
    to `permutation.run_permutation_test`.

    :param model_object: Trained instance of `keras.models.Model` or
        `keras.models.Sequential`.
    :param predictor_matrix_in_list: List with only one item (predictor matrix
        as E-by-M-by-N-by-C numpy array).
    :return: class_probability_matrix: E-by-K numpy array, where
        class_probability_matrix[i, k] is the probability that the [i]th example
        belongs to the [k]th class.
    """

    return model_object.predict(
        predictor_matrix_in_list[0],
        batch_size=predictor_matrix_in_list[0].shape[0])