def METHOD_NAME(dataset, model, epoch, optim, args, neg_k=1, w=None):
    model.METHOD_NAME()
    with timer(name="Sample"):
        S = UniformSample_original_python(dataset)
    users, posItems, negItems = shuffle(S[:, 0], S[:, 1], S[:, 2])
    users = paddle.to_tensor(users, dtype='int64')
    posItems = paddle.to_tensor(posItems, dtype='int64')
    negItems = paddle.to_tensor(negItems, dtype='int64')
    batch_size = int(args.batch_size)
    total_batch = len(users) // batch_size + 1
    avg_loss = 0.
    pbar = tqdm(minibatch(users, posItems, negItems, batch_size=batch_size))
    for (batch_i, (batch_users, batch_pos, batch_neg)) in enumerate(pbar):
        loss, reg_loss = model.bpr_loss(batch_users, batch_pos, batch_neg)
        reg_loss = reg_loss * args.decay
        loss = loss + reg_loss
        loss.backward()
        optim.step()
        optim.clear_grad()
        avg_loss += loss.numpy()
        pbar.set_description(f'losses: {avg_loss[0]/(batch_i+1)}')
    avg_loss = avg_loss / total_batch
    time_info = timer.dict()
    timer.zero()
    return f"loss{avg_loss[0]:.3f}-{time_info}"