def check_is_agent_chat_span(self, span_id: Optional[str]) -> bool:
        """
        Starting with a given span_id, navigate all ancestor spans to determine
        whether an AgentRunStepStartEvent is associated with at least one ancestor.
        """
        if not span_id:
            return False
        elif span_id in self.is_agent_chat_span and self.is_agent_chat_span[span_id]:
            return True
        else:
            return self.check_is_agent_chat_span(self.span_parent.get(span_id, None))

        Starting with a given span_id, navigate all ancestor spans to determine
        whether an AgentRunStepStartEvent is associated with at least one ancestor.
        
llama-index-integrations/callbacks/llama-index-callbacks-agentops/llama_index/callbacks/agentops/base.py