human
Solve the following python programming problem given the following code:
def test_trace_extradims() : 
    def fun(x) : 
        return to_scalar (np.trace (x, offset = offset)) 
d_fun = (lambda x : to_scalar (grad (fun) (x))) 
    mat = npr.randn (5, 6, 4, 3) 
    offset = npr.randint ((- 5), 6) 
    check_grads (fun, d_fun) 
    check_grads (d_fun, mat) 

    
    

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

check_grads (fun, mat)