import itertools


def _create_configs(dict_):
  """Creates a list of dictionaries with the parameters.

  Expands all possible combinations between lists inside dictionary.
  Example: dict1 = {a=['data1','data2'], b=['model1','model2']}
  output= [{a='data1',b='model1'}, {a='data1',b='model2'},
  {a='data2',b='model1'}, {a='data2',b='model2'}].

  Args:
    dict_: dictionary with the lists.
  Returns:
    list of config files.
  """
  keys = dict_.keys()
  vals = dict_.values()
  configs = []
  for instance in itertools.product(*vals):
    configs.append(dict(zip(keys, instance)))
  return configs