from typing import List


def _bucket(number: float, bucket_boundaries: List[float]) -> int:
  """Returns an int representing a bucket for the number."""
  for index, (left, right) in enumerate(zip(bucket_boundaries,
                                            bucket_boundaries[1:])):
    if left <= number < right:
      return index
  return len(bucket_boundaries) - 1