def check_closed_path(self):
    'Checks that data is not changed for the first closed path found. Returns True if data==data after\n        moving around the closed path, False otherwise. Starting point is current_node '
    temp_data = self.data
    path = self.get_path(self.current_node, self.current_node)
    if self.is_path_valid(path):
        pass
    else:
        print('Path is not valid, graph definition is broken')
        raise
    out = (temp_data == self.data)
    out_list = [self.current_node, path, out]
    print('The assertion that the data remains unchanged,\nfor node {0} following path {1} is {2}'.format(*out_list))
    return out
Checks that data is not changed for the first closed path found. Returns True if data==data after
moving around the closed path, False otherwise. Starting point is current_node
def check_closed_path(self):
    'Checks that data is not changed for the first closed path found. Returns True if data==data after\n        moving around the closed path, False otherwise. Starting point is current_node '
    temp_data = self.data
    path = self.get_path(self.current_node, self.current_node)
    if self.is_path_valid(path):
        pass
    else:
        print('Path is not valid, graph definition is broken')
        raise
    out = (temp_data == self.data)
    out_list = [self.current_node, path, out]
    print('The assertion that the data remains unchanged,\nfor node {0} following path {1} is {2}'.format(*out_list))
    return out