def query_parameters(param_list, defaults=None):
    """
    Asks the user for parameters. If available, proposes some defaults.

    Args:
        param_list (list): List of parameters to ask the user for values.
        defaults (list): A list of proposed defaults. It must be a list of the
            same length as param_list. A value of None in one element of the
            list means that no default will be proposed for the corresponding
            parameter.
    """

    script_params = collections.OrderedDict([k, []] for k in param_list)

    for param, default in zip(list(script_params.keys()), defaults):
        user_input = click.prompt("%s" % param, default=default)
        script_params[param] = ast.literal_eval(user_input)

    return script_params