def _map_record_id_to_record_roots(
    events: pd.DataFrame,
) -> Dict[str, pd.Series]:
    """Map record_id to record roots.

    Args:
        events: DataFrame containing trace events.

    Returns:
        Mapping from record_id to record root.
    """
    ret = {}
    for _, curr in events.iterrows():
        record_attributes = curr["record_attributes"]
        if (
            record_attributes.get(SpanAttributes.SPAN_TYPE)
            == SpanAttributes.SpanType.RECORD_ROOT
        ):
            record_id = record_attributes.get(SpanAttributes.RECORD_ID)
            if record_id in ret:
                _logger.warning(
                    f"Multiple record roots found for record_id={record_id}!"
                )
            ret[record_id] = curr
    return ret
Map record_id to record roots.

    Args:
        events: DataFrame containing trace events.

    Returns:
        Mapping from record_id to record root.
    
src/feedback/trulens/feedback/computer.py