def _GetChartFactory(chart_class, display_class):
  def Inner(*args, **kwargs):
    chart = chart_class(*args, **kwargs)
    chart.display = display_class(chart)
    return chart
  return Inner

# These helper methods make it easy to get chart objects with display
# objects already setup.  For example, this:
#   chart = google_chart_api.LineChart()
# is equivalent to:
#   chart = line_chart.LineChart()
#   chart.display = google_chart_api.LineChartEncoder()
#
# (If there's some chart type for which a helper method isn't available, you
# can always just instantiate the correct encoder manually, like in the 2nd
# example above).
# TODO: fix these so they have nice docs in ipython (give them __doc__)
Create a factory method for instantiating charts with displays.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/graphy/graphy/backends/google_chart_api/__init__.py/_GetChartFactory