code: def _exponential_backoff(
      attempt: int,
      multiplier: float,
      exponential_base: float,
      max_interval: float,
  ) -> float:
      """Calculate the duration of an exponential backoff"""
      try:
          interval = multiplier * exponential_base**attempt
      except OverflowError:
          return max_interval
  
      return min(max_interval, interval)
  
imports: from __future__ import annotations
  import asyncio
  import datetime
  import logging
  import uuid
  import warnings
  from contextlib import suppress
  from typing import Any
  from packaging.version import parse
  from tornado.ioloop import IOLoop
  import dask.config
  from dask.utils import _deprecated, format_bytes, parse_timedelta, typename
  from dask.widgets import get_template
  from distributed.compatibility import PeriodicCallback
  from distributed.core import Status
  from distributed.deploy.adaptive import Adaptive
  from distributed.metrics import time
  from distributed.objects import SchedulerInfo
  from distributed.utils import Log, Logs, LoopRunner, NoOpAwaitable, SyncMethodMixin, format_dashboard_link, log_errors
label_desc: Use image node_id 1 for calling a global function with example usage: _exponential_backoff(attempt, multiplier, exponential_base, max_interval) and returns: min, max_interval