from datetime import datetime


def calculate_duration(start_time: datetime, end_time: datetime) -> float:
    """Calculate the duration of a process instance given start and end timestamp.

    :param start_time: start
    :param end_time: end
    :return: duration in seconds
    """
    return (end_time - start_time).total_seconds()