human
Solve the following python programming problem given the following code:
def test_cast_to_int() : 
    inds = np.ones (5) [:, None] 
    def fun(W) : 
        glued_together = np.concatenate ((W, inds), axis = 1) 
        new_W = W [:, : (- 1)] 
        new_inds = np.int64 (W [:, (- 1)]) 
        assert (new_inds.dtype == np.int64) 
        return new_W [new_inds].sum () 
W = np.random.randn (5, 10) 
    check_grads (fun, fun) 

    
    

    Fix the buggy line: check_grads (fun, fun)
assistant
#Here is Python code to fix the buggy line: check_grads (fun, fun)
.

check_grads (fun, W)