def listify(*args):
    """
    Given a set of parameters where some of them are given as lists and the
    others as values, put brackets around the values to make lists of 1 element
    so that we can use a for loop on all parameters in  run_synthetic_exps.
    For instance, the tuple of parameters
    (n=500, k=[10, 15, 20], dim=10, ampl=[0, 1, 2])
    is changed into
    (n=[500], k=[10, 15, 20], dim=[10], ampl = [0, 1, 2]) by this function.
    """
    listed_args = ()
    for arg in args:
        if type(arg) == list:
            listed_args += (arg, )
        else:
            listed_args += ([arg], )
    return(listed_args)