Create an es_dsl aggregation object for getting the percentiles value of a field.
        In general this is used to get the median (0.5) percentile.

        :param field: field from which the get the percentiles values
        :return: a tuple with the aggregation id and es_dsl aggregation object. Ex:
                {
                    "percentile": {
                        "field": <field>
                }

def __get_query_agg_percentiles(cls, field, agg_id=None):
        """
        Create an es_dsl aggregation object for getting the percentiles value of a field.
        In general this is used to get the median (0.5) percentile.

        :param field: field from which the get the percentiles values
        :return: a tuple with the aggregation id and es_dsl aggregation object. Ex:
                {
                    "percentile": {
                        "field": <field>
                }
        """
        if not agg_id:
            agg_id = cls.AGGREGATION_ID
        query_agg = A("percentiles", field=field)
        return (agg_id, query_agg)