def takeSomeFromQueue(self):
    def yield_max_datapoints():
      for count in range(settings.MAX_DATAPOINTS_PER_MESSAGE):
        try:
          yield self.queue.popleft()
        except IndexError:
          raise StopIteration
    return list(yield_max_datapoints())
Generates a menu manager representing the context menu shown when
dataset/ETHPy150Open graphite-project/carbon/lib/carbon/client.py/CarbonClientFactory.takeSomeFromQueue--crossover with--dataset/ETHPy150Open enthought/envisage/envisage/ui/single_project/project_plugin.py/ProjectPlugin._get_no_selection_context_menu_manager