'Discard items in the queue if the queue is longer than the beam.'

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((u'        %-50s    [DISCARDED]' % chart.pretty_format_edge(edge, 2)))
        del queue[:split]
