def _GetChartFactory(chart_class, display_class):
  """Create a factory method for instantiating charts with displays.

  Returns a method which, when called, will create & return a chart with
  chart.display already populated.
  """
  def Inner(*args, **kwargs):
    chart = chart_class(*args, **kwargs)
    chart.display = display_class(chart)
    return chart
  return Inner
Create a factory method for instantiating charts with displays.

  Returns a method which, when called, will create & return a chart with
  chart.display already populated.
  
mapreduce/lib/graphy/backends/google_chart_api/__init__.py