in pythonflow/util.py [0:0]
def get_slow_operations(self, num_operations=None):
"""
Get the slowest operations.
Parameters
----------
num_operations : int or None
Maximum number of operations to return or `None`
Returns
-------
times : collections.OrderedDict
Mapping of execution times keyed by operations.
"""
items = list(sorted(self.times.items(), key=lambda x: x[1], reverse=True))
if num_operations is not None:
items = items[:num_operations]
return collections.OrderedDict(items)