def METHOD_NAME():
    x = init_value[:, 0:embedding_size]
    st = init_value[:, embedding_size:]
    def train_one_iter(iter, num_valid, grad, model, state):
        grad[0:num_valid] = grad[0:num_valid] * (scale / down_scale_by)
        lr = learning_rate / (1 + iter * lr_decay)
        state[0:num_valid] = (
            state[0:num_valid] + grad[0:num_valid] * grad[0:num_valid]
        )
        model[0:num_valid] = (
            model[0:num_valid]
            - lr / (np.sqrt(state[0:num_valid]) + epsilon) * grad[0:num_valid]
            - lr * weight_decay * model[0:num_valid]
        )
        return (model, state)
    for i in range(1, train_iters):
        if skip_if_seq[i] > 0:
            pass
        else:
            (x, st) = train_one_iter(
                i, int(num_valid_seq[i]), random_grad_seq[i], x, st
            )
    return x, st