def _create_network(list_consecutive_links_up, outlet):
    """
    This function reads a CSV file containing the hydrological connectivity of a given network.
    It can only read CSV file containing the headers 'WaterBody' and 'NeighbourUp'.

    :param list_consecutive_links_up: list of tuples for each couple of connected WaterBodies
    :type list_consecutive_links_up: list
    :param outlet: name of the outlet WaterBody
    :type outlet: list
    :return: a dictionary with key: waterbody, val: tup(code of node downstream, code of node upstream)
    :rtype: dict
    """
    list_nodes = list()
    dict_consecutive_links_down = dict()
    dict_link_to_node_down = dict()
    dict_link_and_surrounding_nodes = dict()
    future_rivers = list()
    for tup in list_consecutive_links_up:
        dict_consecutive_links_down[tup[1]] = tup[0]
    river_outlet = [outlet]
    node_code = 0
    dict_link_to_node_down[outlet] = '%04d' % node_code
    list_nodes.append('%04d' % node_code)
    rivers = river_outlet[:]
    while rivers:
        for river in rivers:
            node_code += 1
            list_nodes.append('%04d' % node_code)
            dict_link_and_surrounding_nodes[river] = dict_link_to_node_down[
                river], '%04d' % node_code
            for key in dict_consecutive_links_down:
                if dict_consecutive_links_down[key] == river:
                    dict_link_to_node_down[key] = '%04d' % node_code
                    future_rivers.append(key)
        del rivers[:]
        rivers = future_rivers[:]
        del future_rivers[:]
    return dict_link_and_surrounding_nodes, list_nodes
