def to_timestamp(timestamp: Optional[int]) -> datetime:
    """
    Utility function for converting OTEL timestamps to datetime objects.
    """
    if timestamp:
        return datetime.fromtimestamp(timestamp * 1e-9)

    return datetime.now()

    Utility function for converting OTEL timestamps to datetime objects.
    
src/core/trulens/experimental/otel_tracing/core/exporter/utils.py