Create an es_dsl aggregation object for getting the average value of a field.

        :param field: field from which the get the average value
        :return: a tuple with the aggregation id and es_dsl aggregation object. Ex:
                {
                    "avg": {
                        "field": <field>
                }

def __get_query_agg_avg(cls, field, agg_id=None):
        """
        Create an es_dsl aggregation object for getting the average value of a field.

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