docstr: Returns a tuple of duration buckets in seconds. If not explicitly configured,
  the Prometheus default is returned; otherwise, a set of exponential buckets
  generated based on the configuration is returned.
code: def duration_buckets(
      duration: dict[str, t.Any] = Provide[
          api_server_config.metrics.duration
      ]
  ) -> tuple[float, ...]:
      """
      Returns a tuple of duration buckets in seconds. If not explicitly configured,
      the Prometheus default is returned; otherwise, a set of exponential buckets
      generated based on the configuration is returned.
      """
      from ..utils.metrics import INF
      from ..utils.metrics import exponential_buckets
  
      if "buckets" in duration:
          return tuple(duration["buckets"]) + (INF,)
      else:
          if len(set(duration) - {"min", "max", "factor"}) == 0:
              return exponential_buckets(
                  duration["min"], duration["factor"], duration["max"]
              )
          raise BentoMLConfigException(
              f"Keys 'min', 'max', and 'factor' are required for 'duration' configuration, '{duration!r}'."
          ) from None
  
imports: from __future__ import annotations
  import logging
  import math
  import os
  import typing
  import uuid
  from copy import deepcopy
  from dataclasses import dataclass
  from pathlib import Path
  from typing import TYPE_CHECKING
  import schema
  import yaml
  from deepmerge.merger import Merger
  from simple_di import Provide
  from simple_di import providers
  from ...exceptions import BentoMLConfigException
  from ..context import component_context
  from ..context import trace_context
  from ..resource import CpuResource
  from ..resource import system_resources
  from ..utils import split_with_quotes
  from ..utils import validate_or_create_dir
  from ..utils.unflatten import unflatten
  from .None import expand_env_var
  from .helpers import expand_env_var_in_values
  from .helpers import flatten_dict
  from .helpers import get_default_config
  from .helpers import import_configuration_spec
  from .helpers import load_config_file
label_desc: Use image node_id 19 for calling the _BentoMLContainerClass obj's underlying member method code with example usage: obj.duration_buckets(duration) and returns: unknown, exponential_buckets