code: def compat_explain(cur):
      
      res = cur.explain()
      if 'nscannedObjects' in res:
          res['executionStats'] = dict(
              nReturned=res.pop('n'),
              totalKeysExamined=res.pop('nscanned'),
              totalDocsExamined=res.pop('nscannedObjects'),
              executionTimeMillis=res.pop('millis'),
          )
      return res
docs: Simulate MongoDB 3.0 explain result on prior versions.
      http://docs.mongodb.org/v3.0/reference/explain-results/