class MyClass(object):

    def __init__(self):
        self.my_args = [1, 2, 3, 4]
self.output = {}

def my_single_function(self, arg):
    return arg ** 2

def my_parallelized_function(self):
    self.output = dict(zip(self.my_args, pool.map(self.my_single_function,
        self.my_args)))
Python: Efficient workaround for multiprocessing a function that is a data member of a class, from within that class