<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_stats(self, interval):
 """Get cache stats """

        intervaldir = 'stats_{}'.format(interval)
        path = "{}/{}".format(self.cachepath, intervaldir)
        out = dict()
        for elem in os.listdir(path):
            out[elem] = open('{}/{}'.format(path, elem)).read().strip()
        return out