def _call_feedback_function_under_eval_span(
    feedback_function: Callable[
        [Any], Union[float, Tuple[float, Dict[str, Any]]]
    ],
    kwargs: Dict[str, Any],
    eval_root_span: Span,
    is_only_child: bool,
    eval_child_idx: int,
) -> float:
    """
    Call a feedback function with the provided kwargs and return the score.

    Args:
        feedback_function: The feedback function to call.
        kwargs: The keyword arguments to pass to the feedback function.
        eval_root_span: The root span for the evaluation.
        is_only_child:
            Whether this is the only child eval span of the evaluation root.
        eval_child_idx: Index of this eval child span in the evaluation root.

    Returns:
        The score returned by the feedback function.
    """
    with (
        trace.get_tracer_provider()
        .get_tracer(TRULENS_SERVICE_NAME)
        .start_as_current_span(f"eval-{eval_child_idx}")
    ) as eval_span:
        set_general_span_attributes(eval_span, SpanAttributes.SpanType.EVAL)
        res = None
        exc = None
        try:
            res = feedback_function(**kwargs)
            metadata = {}
            if isinstance(res, tuple):
                # If the result is a tuple, it must be (score, metadata) where
                # the metadata has string keys.
                if (
                    len(res) != 2
                    or not isinstance(res[0], numbers.Number)
                    or not isinstance(res[1], dict)
                    or not all([
                        isinstance(curr, str) for curr in res[1].keys()
                    ])
                ):
                    raise ValueError(
                        "Feedback functions must be of type `Callable[Any, Union[float, Tuple[float, Dict[str, Any]]]]`!"
                    )
                res, metadata = res[0], res[1]
            res = float(res)
            eval_span.set_attribute(SpanAttributes.EVAL.SCORE, res)
            _set_metadata_attributes(eval_span, metadata)
            if is_only_child:
                _set_metadata_attributes(eval_root_span, metadata)
            return res
        except Exception as e:
            exc = e
            eval_span.set_attribute(SpanAttributes.EVAL.ERROR, str(e))
            raise e
        finally:
            set_function_call_attributes(
                eval_span, res, get_func_name(feedback_function), exc, kwargs
            )

    Call a feedback function with the provided kwargs and return the score.

    Args:
        feedback_function: The feedback function to call.
        kwargs: The keyword arguments to pass to the feedback function.
        eval_root_span: The root span for the evaluation.
        is_only_child:
            Whether this is the only child eval span of the evaluation root.
        eval_child_idx: Index of this eval child span in the evaluation root.

    Returns:
        The score returned by the feedback function.
    
src/feedback/trulens/feedback/computer.py