human
Solve the following python programming problem given the following code:
@gen.engine
def ComputeUserRequests(merged_store, filenames, callback):
assistant
#Here is the Python program you requested.

    """Fetch and process each file contained in \filenames\.
    """
    stats_by_day = list()
    for f in filenames:
        day = f.split('/')[(-1)]
        day_stats = logs_util.DayUserRequestStats(day)
        contents = (yield gen.Task(merged_store.Get, f))
        dotdict = json.loads(contents)
        day_stats.FromDotDict(dotdict)
        stats_by_day.append(day_stats)
    stats_by_day.sort(key=(lambda stat: stat.day))
    def _Window(seq, n=2):
        '    From    itertools    examples:    http://docs.python.org/release/2.3.5/lib/itertools-example.html\n                Returns    a    sliding    window    (of    width    n)    over    data    from    the    iterable\n                s    ->    (s0,s1,...s[n-1]),    (s1,s2,...,sn),    ...\n                '
        it = iter(seq)
        result = tuple(islice(it, n))
        if (len(result) == n):
            (yield result)
        for elem in it:
            result = (result[1:] + (elem,))
            (yield result)
    def _StatsByRange(seq, days):
        'Returns    a    list    of    day    stats    with    each    entry    being    the    sum    of    #days    consecutive    days.    The    day    field\n                corresponds    to    the    last    day    of    each    interval.\n                '
        windows = _Window(seq, n=days)
        day_stats = list()
        for day_list in windows:
            total = logs_util.DayUserRequestStats(day_list[(-1)].day)
            for day in day_list:
                total.MergeFrom(day)
            day_stats.append(total)
        return day_stats
    def _AddToDayDict(dd, day_stat, suffix):
        'Add    the    various    request    categories    to    the    day    dict.'
        dd[day_stat.day][('active_users.requests_all.%s' % suffix)] = len(day_stat._active_all)
        dd[day_stat.day][('active_users.requests_post.%s' % suffix)] = len(day_stat._active_post)
        dd[day_stat.day][('active_users.requests_share.%s' % suffix)] = len(day_stat._active_share)
        dd[day_stat.day][('active_users.requests_view.%s' % suffix)] =...