Create a percentile aggregation object and add it to the aggregation dict

        :param field: the field present in the index that is to be aggregated
        :param percents: the specific percentiles to be calculated
                         default: [1.0, 5.0, 25.0, 50.0, 75.0, 95.0, 99.0]
        :returns: self, which allows the method to be chainable with the other methods

def get_percentiles(self, field=None, percents=None):
        """
        Create a percentile aggregation object and add it to the aggregation dict

        :param field: the field present in the index that is to be aggregated
        :param percents: the specific percentiles to be calculated
                         default: [1.0, 5.0, 25.0, 50.0, 75.0, 95.0, 99.0]
        :returns: self, which allows the method to be chainable with the other methods
        """

        if not field:
            raise AttributeError("Please provide field to apply aggregation to!")
        if not percents:
            percents = [1.0, 5.0, 25.0, 50.0, 75.0, 95.0, 99.0]
        agg = A("percentiles", field=field, percents=percents)

        self.aggregations['percentiles_' + field] = agg
        return self