def METHOD_NAME(exe, gw, gf, program, pred, inputs, args, step_idx,
                    min_va_val, min_val):
    """inference model"""
    x_val, x_test, x_stats = inputs.get_data('val'), inputs.get_data(
        'test'), inputs.get_stats()
    if args.n_his + args.n_pred > x_val.shape[1]:
        raise ValueError(
            f'ERROR: the value of n_pred "{args.n_pred}" exceeds the length limit.'
        )
    # y_val shape: [n_pred, len(x_val), n_route, C_0)
    y_val, len_val = multi_pred(exe, gw, gf, program, pred, \
            x_val, args.batch_size, args.n_his, args.n_pred, step_idx)
    evl_val = evaluation(x_val[0:len_val, step_idx + args.n_his, :, :],
                         y_val[step_idx], x_stats)
    # chks: indicator that reflects the relationship of values between evl_val and min_va_val.
    chks = evl_val < min_va_val
    # update the metric on test set, if model's performance got improved on the validation.
    if sum(chks):
        min_va_val[chks] = evl_val[chks]
        y_pred, len_pred = multi_pred(exe, gw, gf, program, pred, \
                x_test, args.batch_size, args.n_his, args.n_pred, step_idx)
        evl_pred = evaluation(x_test[0:len_pred, step_idx + args.n_his, :, :],
                              y_pred[step_idx], x_stats)
        min_val = evl_pred
    return min_va_val, min_val