def METHOD_NAME(params):
    embeddings = sok.lookup_sparse(params, indices, combiners=combiners)
    loss = 0
    for i in range(len(embeddings)):
        loss = loss + tf.reduce_sum(embeddings[i])
    grads = tf.gradients(loss, params)
    optimizer.apply_gradients(zip(grads, params))
    loss = hvd.allreduce(loss, op=hvd.Sum)
    return loss, embeddings, grads