code: def distribute(self, f, n):
          
  
          if self.pool is None:
              return [f(i) for i in range(n)]
          else:
              return self.pool.map(f, range(n))
docs: Distribute the computations amongst the multiprocessing pools
  
          Parameters
          ----------
          f : function
            Function to be distributed to the processors
          n : int
            The values in range(0,n) will be passed as arguments to the
            function f.