<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def runExperimentPool(numSequences, numFeatures, numLocations, numObjects, numWorkers=7, nTrials=1, seqLength=10, figure="", numRepetitions=1, synPermProximalDecL2=[0.001], minThresholdProximalL2=[10], sampleSizeProximalL2=[15], inputSize=[1024], basalPredictedSegmentDecrement=[0.0006], resultsName="convergence_results.pkl"):
 """ Run a bunch of experiments using a pool of numWorkers multiple processes. For numSequences, numFeatures, and numLocations pass in a list containing valid values for that parameter. The cross product of everything is run, and each combination is run nTrials times. Returns a list of dict containing detailed results from each experiment. Also pickles and saves all the results in resultsName for later analysis. If numWorkers == 1, the experiments will be run in a single thread. This makes it easier to debug. Example: results = runExperimentPool( numSequences=[10, 20], numFeatures=[5, 13], numWorkers=8, nTrials=5) """

  # Create function arguments for every possibility
  args = []

  for bd in basalPredictedSegmentDecrement:
    for i in inputSize:
      for thresh in minThresholdProximalL2:
        for dec in synPermProximalDecL2:
          for s in sampleSizeProximalL2:
            for o in reversed(numSequences):
              for l in numLocations:
                for f in numFeatures:
                  for no in numObjects:
                    for t in range(nTrials):
                      args.append(
                        {"numSequences": o,
                         "numFeatures": f,
                         "numObjects": no,
                         "trialNum": t,
                         "seqLength": seqLength,
                         "numLocations": l,
                         "sampleSizeProximalL2": s,
                         "synPermProximalDecL2": dec,
                         "minThresholdProximalL2": thresh,
                         "numRepetitions": numRepetitions,
                         "figure": figure,
                         "inputSize": i,
                         "basalPredictedSegmentDecrement": bd,
                         }
                      )
  print "{} experiments to run, {} workers".format(len(args), numWorkers)

  # Run the pool
  if numWorkers > 1:
    pool = Pool(processes=numWorkers)
    result = pool.map(runExperiment, args)
  else:
    result = []
    for arg in args:
      result.append(runExperiment(arg))

  # Pickle results for later use
  with open(resultsName,"wb") as f:
    cPickle.dump(result,f)

  return result