def _run_path(self, path_num):
        """
        standalone function implementing a single loop of Monte Carlo
        It returns list produced by consumer at observation dates

        :param int path_num: path number
        """
        # pre processing
        self.producer.initialize_path(path_num)
        self.consumer.initialize_path(path_num)

        # processing
        for new_date in self.grid:
            state = self.producer.evolve(new_date)
            self.consumer.consume(state)

        # post processing
        self.consumer.finalize_path(path_num)
def _run_path ( self , path_num ) : self . producer . initialize_path ( path_num ) self . consumer . initialize_path ( path_num ) for new_date in self . grid : state = self . producer . evolve ( new_date ) self . consumer . consume ( state ) self . consumer . finalize_path ( path_num )
standalone function implementing a single loop of Monte Carlo
        It returns list produced by consumer at observation dates

        :param int path_num: path number