import itertools


def _parameter_combinations(parameters_dict):
    """ Creates parameter combinations from a dict filled with list values, e.g.
    parameters_dict = {
        'width' : [0.1,0.2],
        'length' : [4,5,6],
        'height' : [22]
        }
    Will produce a list of dictionaries, each of which can be used as kwargs input:
        [{'height': 22, 'length': 4, 'width': 0.1},
         {'height': 22, 'length': 5, 'width': 0.1},
         {'height': 22, 'length': 6, 'width': 0.1},
         {'height': 22, 'length': 4, 'width': 0.2},
         {'height': 22, 'length': 5, 'width': 0.2},
         {'height': 22, 'length': 6, 'width': 0.2}]
"""
    value_combinations = list(itertools.product(*parameters_dict.values()))
    keys = list(parameters_dict.keys())
    return [{keys[n]:values[n] for n in range(len(keys))} for values in value_combinations]