code: def operator_iteration(self, T, v, max_iter, tol=None, *args, **kwargs):
          
          # May be replaced with quantecon.compute_fixed_point
          if max_iter <= 0:
              return v, 0
  
          for i in range(max_iter):
              new_v = T(v, *args, **kwargs)
              if tol is not None and np.abs(new_v - v).max() < tol:
                  v[:] = new_v
                  break
              v[:] = new_v
  
          num_iter = i + 1
  
          return num_iter
docs: Iteratively apply the operator `T` to `v`. Modify `v` in-place.
          Iteration is performed for at most a number `max_iter` of times.
          If `tol` is specified, it is terminated once the distance of
          `T(v)` from `v` (in the max norm) is less than `tol`.
  
          Parameters
          ----------
          T : callable
              Operator that acts on `v`.
  
          v : ndarray
              Object on which `T` acts. Modified in-place.
  
          max_iter : scalar(int)
              Maximum number of iterations.
  
          tol : scalar(float), optional(default=None)
              Error tolerance.
  
          args, kwargs :
              Other arguments and keyword arguments that are passed
              directly to the function T each time it is called.
  
          Returns
          -------
          num_iter : scalar(int)
              Number of iterations performed.