<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def multiprocessing_run(cmdlines, workers=None):
 """Distributes passed command-line jobs using multiprocessing. - cmdlines - an iterable of command line strings Returns the sum of exit codes from each job that was run. If all goes well, this should be 0. Anything else and the calling function should act accordingly. """

    # Run jobs
    # If workers is None or greater than the number of cores available,
    # it will be set to the maximum number of cores
    pool = multiprocessing.Pool(processes=workers)
    results = [pool.apply_async(subprocess.run, (str(cline), ),
                                {'shell': sys.platform != "win32",
                                 'stdout': subprocess.PIPE,
                                 'stderr': subprocess.PIPE})
               for cline in cmdlines]
    pool.close()
    pool.join()
    return sum([r.get().returncode for r in results])