def METHOD_NAME(model, optimizer, H, X, Y, train_mask):
    model.METHOD_NAME()
    Y_hat = model(H, X)
    loss = F.cross_entropy(Y_hat[train_mask], Y[train_mask])
    optimizer.zero_grad()
    loss.backward()
    optimizer.step()
    return loss.item()