def timestamp_str_to_seconds(timestamp):
    """Converts a timestamp string in "HH:MM:SS.XXX" format to seconds.

    Args:
        timestamp: a string in "HH:MM:SS.XXX" format

    Returns:
        the number of seconds
    """
    return sum(
        float(n) * m
        for n, m in zip(reversed(timestamp.split(":")), (1, 60, 3600))
    )