collection = self._collections.get(name, None) code example
Example 1: python counting dictionary
counts = dict()
for i in items:
counts[i] = counts.get(i, 0) + 1
Example 2: python counter
>>> c = Counter(a=4, b=2, c=0, d=-2)
>>> d = Counter(a=1, b=2, c=3, d=4)
>>> c.subtract(d)
>>> c
Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6})