code: def check_nocycles(Adj, verbosity=2):
      
      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
docs: \
      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.