<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def trim(self):
 """Clear not used counters"""

        for key, value in list(iteritems(self.counters)):
            if value.empty():
                del self.counters[key]