import pickle


def load_nodes(path):
    """
    load nodes from storage file
    """
    nodes = {}
    with open(path, 'rb') as file:
        nodes = pickle.load(file)

    for node in nodes.values():
        # reset old properties
        node.online = False
        node.index = None
        node.clientcount = 0

    return nodes