def METHOD_NAME(
    start_datetime_utc: datetime,
    end_datetime_utc: datetime,
    period_duration: timedelta,
    overlap: Union[None, timedelta] = None,
) -> List[Period]:
    """
    Returns a list of `Period` of duration `period_duration` covering the time range
    from `start_datetime_utc` to `end_datetime_utc`.
    If `overlap` is specified, the `Period` returned will overlap by the amount
    specified, otherwise the end of one period will coincide with the start of the
    next one.
    If `period_duration` is shorter than the time between `start_datetime_utc` and
    `end_datetime_utc`, returns a list with a single `Period` starting on
    `start_datetime_utc` and ending on `end_datetime_utc`.
    This is useful to break a long time range into smaller periods for processing time
    series data that would take up too much memory to handle in one piece.
    Args:
        start_datetime_utc (datetime): start of the period to cover
        end_datetime_utc (datetime): end of the period to cover
        period_duration (timedelta): duration of the individual
          periods returned
        overlap (Union[None, timedelta]): overlap between successive
          periods, if specified. Defaults to `None`.
    """
    if not overlap:
        overlap = timedelta(0)
    try:
        assert period_duration > overlap
    except AssertionError:
        raise ValueError("'period_duration' cannot be shorter than 'overlap'.")
    try:
        assert end_datetime_utc >= start_datetime_utc
    except AssertionError:
        raise ValueError(
            "'end_datetime_utc' cannot be before than 'start_datetime_utc'."
        )
    if end_datetime_utc - start_datetime_utc <= period_duration:
        return [Period(start=start_datetime_utc, end=end_datetime_utc)]
    else:
        periods = METHOD_NAME(
            start_datetime_utc=start_datetime_utc + period_duration - overlap,
            end_datetime_utc=end_datetime_utc,
            period_duration=period_duration,
            overlap=overlap,
        )
        periods.insert(
            0,
            Period(
                start=start_datetime_utc,
                end=start_datetime_utc + period_duration,
            ),
        )
        return periods