import dill


def run_dill_encoded(what):
    """
    Run a function that's been encoded with Dill (this allows me to do multiprocessing).

    http://stackoverflow.com/a/24673524
    """
    fun, args = dill.loads(what)
    return fun(*args)