Call the parallelized sampler's ``run`` method. Each process
        will run for ``N`` iterations. Then, the master process (process with
        ``rank = 0``) collects the samples and weights from all processes and
        stores it into ``self.samples_list`` and ``self.weights_list``.
        Master process:   Return a list of the return values from the workers.
        Other  processes: Return the same as the sequential sampler.

        .. seealso::

            :py:class:`pypmc.tools.History`

        :param N:

            Integer; the number of steps to be passed to the ``run`` method.

        :param args, kwargs:

            Additional arguments which are passed to the ``sampler_type``'s
            run method.

def run(self, N=1, *args, **kwargs):
        '''Call the parallelized sampler's ``run`` method. Each process
        will run for ``N`` iterations. Then, the master process (process with
        ``rank = 0``) collects the samples and weights from all processes and
        stores it into ``self.samples_list`` and ``self.weights_list``.
        Master process:   Return a list of the return values from the workers.
        Other  processes: Return the same as the sequential sampler.

        .. seealso::

            :py:class:`pypmc.tools.History`

        :param N:

            Integer; the number of steps to be passed to the ``run`` method.

        :param args, kwargs:

            Additional arguments which are passed to the ``sampler_type``'s
            run method.


        '''
        individual_return = self.sampler.run(N, *args, **kwargs)

        # all workers send samples and weights to master
        self.samples_list = self._comm.gather(self.sampler.samples, root=0)
        if hasattr(self.sampler, 'weights'):
            self.weights_list = self._comm.gather(self.sampler.weights, root=0)

        # master returns list of worker return values
        master_return = self._comm.gather(individual_return, root=0)

        if self._rank == 0:
            return master_return
        else:
            return individual_return