def get_list_of_new_entries(device_entries: list, file_entries: list) -> list:
    """
    Compares log entries from the local logfile with the log entries from the device

    Args:
        device_entries (list): List of LogEntry Objects, fetched from the device
        file_entries (list): List of LogEntry Objects, fetched from the local logfile

    Raises:
        N/A

    Returns:
        new_entries (list): List of LogEntry objects from the device
        which are not yet present in the local logfile

    """
    new_entries = []
    # if there are no log entries in the local log file or it does not exist yet,
    # simply return the log entries from the device
    if not file_entries:
        return device_entries
    # if there are no log entries on the device, return empty list
    if not device_entries:
        return new_entries
    # otherwise, add the latest log entries from the device until
    # we reach a log entry already present in the local log file
    while device_entries[-1].timestamp > file_entries[-1].timestamp:
        new_entries.append(device_entries.pop())
    # sort by timestamp so the log entries are in the correct order (new entries last)
    new_entries.sort(key=lambda entry: entry.timestamp)

    return new_entries