def display_feedback_call(
    record_id: str,
    call: List[Dict[str, Any]],
    feedback_name: str,
    feedback_directions: Dict[str, bool],
):
    """Display the feedback call details in a DataFrame.

    Args:
        record_id (str): The record ID.
        call (List[Dict[str, Any]]): The feedback call details, including call metadata.
        feedback_name (str): The feedback name.
        feedback_directions (Dict[str, bool]): A dictionary mapping feedback names to their directions. True if higher is better, False otherwise.
    """
    if call is not None and len(call) > 0:
        # NOTE(piotrm for garett): converting feedback
        # function inputs to strings here as other
        # structures get rendered as [object Object] in the
        # javascript downstream. If the first input/column
        # is a list, the DataFrame.from_records does create
        # multiple rows, one for each element, but if the
        # second or other column is a list, it will not do
        # this.
        for c in call:
            args: Dict = c["args"]
            for k, v in args.items():
                if not isinstance(v, str):
                    args[k] = pp.pformat(v)

        df = pd.DataFrame.from_records(c["args"] for c in call)

        df["score"] = pd.DataFrame([
            float(call[i]["ret"]) if call[i]["ret"] is not None else -1
            for i in range(len(call))
        ])
        df["meta"] = pd.Series([call[i]["meta"] for i in range(len(call))])
        df = df.join(df.meta.apply(lambda m: pd.Series(m))).drop(
            columns=["meta", "output", "metadata"], errors="ignore"
        )

        # note: improve conditional to not rely on the feedback name
        if "groundedness" in feedback_name.lower():
            try:
                df = expand_groundedness_df(df)
            except ValueError:
                st.error(
                    "Error expanding groundedness DataFrame. "
                    "Please ensure the DataFrame is in the correct format."
                )

        if df.empty:
            st.warning("No feedback details found.")
        else:
            style_highlight_fn = partial(
                highlight,
                selected_feedback=feedback_name,
                feedback_directions=feedback_directions,
                default_direction=default_direction,
            )
            styled_df = df.style.apply(
                style_highlight_fn,
                axis=1,
            )

            # Format only numeric columns
            for col in df.select_dtypes(include=["number"]).columns:
                styled_df = styled_df.format({col: "{:.2f}"})

            st.dataframe(styled_df, hide_index=True)
    else:
        st.warning("No feedback details found.")
Display the feedback call details in a DataFrame.

    Args:
        record_id (str): The record ID.
        call (List[Dict[str, Any]]): The feedback call details, including call metadata.
        feedback_name (str): The feedback name.
        feedback_directions (Dict[str, bool]): A dictionary mapping feedback names to their directions. True if higher is better, False otherwise.
    
src/dashboard/trulens/dashboard/utils/records_utils.py