def _get_counts(self, f):
self._consolidate_inplace()<EOL>counts = dict()<EOL>for b in self.blocks:<EOL><INDENT>v = f(b)<EOL>counts[v] = counts.get(v, <NUM_LIT:0>) + b.shape[<NUM_LIT:0>]<EOL><DEDENT>return counts<EOL>
return a dict of the counts of the function in BlockManager