<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_nocycles(Adj, verbosity=2):
 """\ Checks that there are no cycles in graph described by adjacancy matrix. Parameters Adj (np.array):
 adjancancy matrix of dimension (dim, dim) Returns ------- True if there is no cycle, False otherwise. """

    dim = Adj.shape[0]
    for g in range(dim):
        v = np.zeros(dim)
        v[g] = 1
        for i in range(dim):
            v = Adj.dot(v)
            if v[g] > 1e-10:
                if verbosity > 2:
                    settings.m(0,Adj)
                    settings.m(0,'contains a cycle of length',i+1,
                          'starting from node',g,
                          '-> reject')
                return False
    return True