def get_timetable_with_minimum_departure_datetime_difference(departure_datetime_differences):
    """
    Get the timetable with the minimum departure_datetime difference.

    :param departure_datetime_differences: [{
                 'timetable': timetable_document, 'departure_datetime_difference': float (in seconds)}]

    :return: timetable_with_min_departure_datetime_difference: timetable_document
    """
    # minimum_datetime_difference is initialized with a big datetime value.
    min_departure_datetime_difference = 356 * 86400
    timetable_with_min_departure_datetime_difference = None

    for departure_datetime_difference_entry in departure_datetime_differences:
        timetable = departure_datetime_difference_entry.get('timetable')
        departure_datetime_difference = departure_datetime_difference_entry.get('departure_datetime_difference')

        if departure_datetime_difference < min_departure_datetime_difference:
            min_departure_datetime_difference = departure_datetime_difference
            timetable_with_min_departure_datetime_difference = timetable

    return timetable_with_min_departure_datetime_difference