docs: def __get_query_agg_cardinality(cls, field, agg_id=None):
          """
          Create an es_dsl aggregation object for getting the approximate count of distinct values of a field.
  
          :param field: field from which the get count of distinct values
          :return: a tuple with the aggregation id and es_dsl aggregation object. Ex:
                  {
                      "cardinality": {
                          "field": <field>,
                          "precision_threshold": 3000
                  }
          """
          if not agg_id:
              agg_id = cls.AGGREGATION_ID
          query_agg = A("cardinality", field=field, precision_threshold=cls.ES_PRECISION)
          return (agg_id, query_agg)