def _GetDataEncoder(self, chart):
    """Get a class which can encode the data the way the user requested."""
    if not self.enhanced_encoding:
      return util.SimpleDataEncoder()
    return util.EnhancedDataEncoder()
Get a class which can encode the data the way the user requested.
mapreduce/lib/graphy/backends/google_chart_api/encoders.py