def extrapolate_statistics(scope):
    c = {}
    for k, v in list(scope.items()):
        if isinstance(v, dict):
            v = extrapolate_statistics(v)
        elif isinstance(v, (list, tuple)):
            v = [extrapolate_statistics(record) for record in v]
        elif hasattr(v, '__call__'):
            v = v(scope)
        c[k] = v
    return c


# --------------------- CherryPy Applications Statistics --------------------- #
A copy of fnmatch.translate that replaces with [^\/] instead of . to match path globs.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/cherrypy/cherrypy/lib/cpstats.py/extrapolate_statistics--crossover with--dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/dxpy/utils/pathmatch.py/translate