def convert_basin_stack_to_value_dict(basin_stack_list):
    """
    This takes the basin stack list and then gives each basin in a stack layer a constant value. Used for plotting. So if there are several basin stacks each one gets a different value. 
    
    Args:
        basin_stack_list (list of int lists): The basins that will be stacked. Each item in the list is a collection of basins that will be used in each indivdual stack plot. So, for example, if this is [ [1,2,3],[4,5]] then there will be two stacked plot, the first with basins 1,2,3 and the second with basins 4 and 5.
        
    Returns: 
        this_value_dict (dict): A dictionary assigning a single value to each basin. Basins in the same stack will have the same value. 
        
    Author: SMM
    
    Date: 11/01/2017
    
    """
    N_stacks = len(basin_stack_list)
    print('The number of stacks are: ' + str(N_stacks))
    if len(basin_stack_list) == 0:
        this_value_dict = {}
    else:
        this_value_dict = {}
        for idx, stack in enumerate(basin_stack_list):
            value = float(idx) / float(N_stacks)
            for item in stack:
                this_value_dict[item] = value
    return this_value_dict
