def predict_proba(trained_model, x, batch_size=32, verbose=0):
    """Generates class probability predictions for the input samples.
    The input samples are processed batch by batch.
    # Arguments
        x: input data, as a Numpy array or list of Numpy arrays
            (if the trained_model has multiple inputs).
        batch_size: integer.
        verbose: verbosity mode, 0 or 1.
    # Returns
        A Numpy array of probability predictions.
    """
    probability = trained_model.predict(x, batch_size=batch_size, verbose=
        verbose)
    return probability
