docstr: Configures the summary es aggregation definition
docstr_tok: ["Configures","the","summary","es","aggregation","definition"]
code: def aggregation_request(
      self, *args, **kwargs
  ) -> Optional[Union[Dict[str, Any], List[Dict[str, Any]]]]:
      """
      Configures the summary es aggregation definition
      """
      try:
          return {self.id: self._build_aggregation(*args, **kwargs)}
      except TypeError as ex:
          _LOGGER.warning(
              f"Cannot build metric for metric {self.id}. Error: {ex}. Skipping..."
          )
  
imports: import dataclasses
  import logging
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
  from argilla.server.daos.backend.query_helpers import aggregations
  from argilla.server.helpers import unflatten_dict
label_desc: Use image node_id 4 for calling the ElasticsearchMetric obj's underlying member method code with example usage: obj.aggregation_request() and returns: dict