code: def operations(nsteps):
          '''Returns the number of operations needed for nsteps of GMRES'''
          return {'A': 1 + nsteps,
                  'M': 2 + nsteps,
                  'Ml': 2 + nsteps,
                  'Mr': 1 + nsteps,
                  'ip_B': 2 + nsteps + nsteps*(nsteps+1)/2,
                  'axpy': 4 + 2*nsteps + nsteps*(nsteps+1)/2
                  f operations(nsteps):
          '''Returns the number of operations needed for nsteps of GMRES'''
          return {'A': 1 + nsteps,
                  'M': 2 + nsteps,
                  'Ml': 2 + nsteps,
                  'Mr': 1 + nsteps,
                  'ip_B': 2 + nsteps + nsteps*(nsteps+1)/2,
                  'axpy': 4 + 2*nsteps + nsteps*(nsteps+1)/2
                  }
docs: Returns the number of operations needed for nsteps of GMRES