code: def _check_convergence(self, P, Q, i, type):
          
          normP = linalg.norm(P, Inf)
          normQ = linalg.norm(Q, Inf)
  
          if self.verbose:
              logger.info("  %s  %3d   %10.3e   %10.3e" % (type,i, normP, normQ))
  
          if (normP < self.tolerance) and (normQ < self.tolerance):
              converged = True
          else:
              converged = False
  
          return converged
docs: Checks if the solution has converged to within the specified
          tolerance.