def _feedback_already_computed(
    span_group: Optional[str],
    kwarg_inputs: Dict[str, FeedbackFunctionInput],
    feedback_name: str,
    eval_root_attributes: Sequence[Dict[str, Any]],
) -> bool:
    """Check if feedback has already been computed.

    Args:
        span_group: Span group of the invocation.
        kwarg_inputs: kwarg inputs to feedback function.
        feedback_name: Name of the feedback function.
        eval_root_attributes: List of eval root spans attributes.

    Returns:
        True iff feedback has already been computed.
    """
    for curr in eval_root_attributes:
        curr_span_group = curr.get(SpanAttributes.EVAL_ROOT.SPAN_GROUP)
        if isinstance(curr_span_group, list):
            valid = span_group in curr_span_group
        else:
            valid = span_group == curr_span_group
        valid = valid and feedback_name == curr.get(
            SpanAttributes.EVAL_ROOT.METRIC_NAME
        )
        for k, v in kwarg_inputs.items():
            if not valid:
                break
            if v.span_id != curr.get(
                f"{SpanAttributes.EVAL_ROOT.ARGS_SPAN_ID}.{k}"
            ):
                valid = False
            if v.span_attribute != curr.get(
                f"{SpanAttributes.EVAL_ROOT.ARGS_SPAN_ATTRIBUTE}.{k}"
            ):
                valid = False
        if valid:
            return True
    return False
Check if feedback has already been computed.

    Args:
        span_group: Span group of the invocation.
        kwarg_inputs: kwarg inputs to feedback function.
        feedback_name: Name of the feedback function.
        eval_root_attributes: List of eval root spans attributes.

    Returns:
        True iff feedback has already been computed.
    
src/feedback/trulens/feedback/computer.py