def decompose_timedelta(duration):
    """
    Decompose a duration (timedelta) object into hours, minutes, and seconds.
    """

    days, seconds = duration.days, duration.seconds
    hours = (days * 24 + seconds) // 3600
    minutes = (seconds % 3600) // 60
    seconds = seconds % 60

    return hours, minutes, seconds