# Path: cio/utils/thread.py
# class ThreadLocalObject(local):
#     """
#     Base class to inherit from when thread local instances are needed.
#     """
#     initialized = False
# 
#     def __init__(self):
#         if self.initialized:
#             raise SystemError('%s initialized too many times' % self.__class__.__name__)
#         self.initialized = True


from collections import defaultdict
from ..utils.thread import ThreadLocalObject


class NodeHistory(ThreadLocalObject):

    def __init__(self):
        super(NodeHistory, self).__init__()
        self._history = defaultdict(list)


# Path: cio/utils/thread.py
# class ThreadLocalObject(local):
#     """
#     Base class to inherit from when thread local instances are needed.
#     """
#     initialized = False
# 
#     def __init__(self):
#         if self.initialized:
#             raise SystemError('%s initialized too many times' % self.__class__.__name__)
#         self.initialized = True


# Path: cio/pipeline/history.py
from collections import defaultdict
from ..utils.thread import ThreadLocalObject



class NodeHistory(ThreadLocalObject):

    def __init__(self):
        super(NodeHistory, self).__init__()
        self._history = defaultdict(list)


    def __len__(self):