code: def __quarters(self, from_date=None):
          
          s = Search(using=self._es_conn, index=self._es_index)
          if from_date:
              # Work around to solve conversion problem of '__' to '.' in field name
              q = Q('range')
              q.__setattr__(self._sort_on_field, {'gte': from_date})
              s = s.filter(q)
  
          # from:to parameters (=> from: 0, size: 0)
          s = s[0:0]
  
          s.aggs.bucket(self.TIMEFRAME, 'date_histogram', field=self._timeframe_field,
                        interval='quarter', min_doc_count=1)
          response = s.execute()
  
          quarters = []
          for quarter in response.aggregations[self.TIMEFRAME].buckets:
              period = pandas.Period(quarter.key_as_string, 'Q')
              quarters.append(period)
  
          return quarters
docs: Get a set of quarters with available items from a given index date.
  
          :param from_date:
          :return: list of `pandas.Period` corresponding to quarters