def METHOD_NAME(weight):
    for i in range(tensor_num):
        transposed_weight = np.transpose(weight[i], (1, 0))
        grad = np.matmul(ones, transposed_weight)
        grad = grad + weight_decay * x[i]
        x[i] = x[i] - learning_rate * grad
    return x