parameters: (x, path, mpath)
return_statement: return _topk
docstring: 将所有的都统计一次
docstring_summary: 将所有的都统计一次
docstring_tokens: 将所有的都统计一次
function: def topx(x, path, mpath):
      """ 将所有的都统计一次"""
      res = {}
      for f in getfile(path):
          count(x, f, mpath)
  
      for m in os.listdir(mpath):
          _map = os.path.join(mpath, m)
          with open(_map, 'r') as f:
              k, v = f.split()
              res[k] = res.get(k, 0)+v
  
      _topk = nlargest(x, res.items(), lambda x: x[1])
      return _topk
function_tokens: def topx ( x , path , mpath ) : res = { } for f in getfile ( path ) : count ( x , f , mpath ) for m in os . listdir ( mpath ) : _map = os . path . join ( mpath , m ) with open ( _map , 'r' ) as f : k , v = f . split ( ) res [ k ] = res . get ( k , 0 ) + v _topk = nlargest ( x , res . items ( ) , lambda x : x [ 1 ] ) return _topk