import logging
import pandas as pd
import pymongo

import emission.core.get_database as edb
import emission.storage.timeseries.builtin_timeseries as bits

class AggregateTimeSeries(bits.BuiltinTimeSeries):
    def __init__(self):
        super(AggregateTimeSeries, self).__init__(None)
        self.user_query = {}


import logging
import pandas as pd
import pymongo

import emission.core.get_database as edb
import emission.storage.timeseries.builtin_timeseries as bits

class AggregateTimeSeries(bits.BuiltinTimeSeries):
    def __init__(self):
        super(AggregateTimeSeries, self).__init__(None)
        self.user_query = {}

    def _get_sort_key(self, time_query = None):
        return None

Implement a sort key method for the aggregate timeseries
Implement a sort key method for the aggregate timeseries

This should return null because we want to mix up the identifying information
from the timeseries and sorting will re-impose some order. Also sorting takes
too much time!

  import logging
  import pandas as pd
  import pymongo
  
  import emission.core.get_database as edb
  import emission.storage.timeseries.builtin_timeseries as bits
  
  class AggregateTimeSeries(bits.BuiltinTimeSeries):
      def __init__(self):
          super(AggregateTimeSeries, self).__init__(None)
          self.user_query = {}
  
+     def _get_sort_key(self, time_query = None):
+         return None
  
Implement a sort key method for the aggregate timeseries
## Code Before:
import logging
import pandas as pd
import pymongo

import emission.core.get_database as edb
import emission.storage.timeseries.builtin_timeseries as bits

class AggregateTimeSeries(bits.BuiltinTimeSeries):
    def __init__(self):
        super(AggregateTimeSeries, self).__init__(None)
        self.user_query = {}


## Instruction:
Implement a sort key method for the aggregate timeseries
## Code After:
import logging
import pandas as pd
import pymongo

import emission.core.get_database as edb
import emission.storage.timeseries.builtin_timeseries as bits

class AggregateTimeSeries(bits.BuiltinTimeSeries):
    def __init__(self):
        super(AggregateTimeSeries, self).__init__(None)
        self.user_query = {}

    def _get_sort_key(self, time_query = None):
        return None
