class_docstr: Base elasticsearch histogram aggregation metric
  
  Attributes
  ----------
  field:
      The histogram field
  script:
      If provided, it will be used as scripted field
      for aggregation
  fixed_interval:
      If provided, it will used ALWAYS as the histogram
      aggregation interval
class_docstr_tok: ["Base","elasticsearch","histogram","aggregation","metric","Attributes","--","--","--","--","--","field",":","The","histogram","field","script",":","If","provided",",","it","will","be","used","as","scripted","field","for","aggregation","fixed_interval",":","If","provided",",","it","will","used","ALWAYS","as","the","histogram","aggregation","interval"]
code: def _build_aggregation(
      self, interval: Optional[float] = None
  ) -> Dict[str, Any]:
      if self.fixed_interval:
          interval = self.fixed_interval
  
      return aggregations.histogram_aggregation(
          field_name=self.field, script=self.script, interval=interval
      )
  
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 1 for calling the HistogramAggregation obj's underlying member method code with example usage: obj._build_aggregation(interval) and returns: aggregations