Using multiprocessing to speed up Python programs