def _prune(self, queue, chart):
        if len(queue) > self.beam_size:
            split = len(queue)-self.beam_size
            if self._trace > 2:
                for edge in queue[:split]:
                    print('  %-50s [DISCARDED]' % chart.pretty_format_edge(edge,2))
            del queue[:split]
Discard items in the queue if the queue is longer than the beam.
dataset/ETHPy150Open nltk/nltk/nltk/parse/pchart.py/BottomUpProbabilisticChartParser._prune