class_docstr: Unit tests for Agent class
code: def test_call_prompt_max_retry_on_error(self, agent: Agent):
      # test the LLM call failed twice but succeed third time
      agent._lake.llm.call = Mock()
      agent._lake.llm.call.side_effect = [
          Exception(),
          Exception(),
          "LLM Result",
      ]
      prompt = ExplainPrompt(conversation="test conversation", code="")
      result = agent._call_llm_with_prompt(prompt)
      assert result == "LLM Result"
      assert agent._lake.llm.call.call_count == 3
  
imports: from typing import Optional
  from unittest.mock import Mock
  from pandasai.agent import Agent
  import pandas
  import pytest
  from pandasai.llm.fake import FakeLLM
  from pandasai.prompts.clarification_questions_prompt import ClarificationQuestionPrompt
  from pandasai.prompts.explain_prompt import ExplainPrompt
  from pandasai.smart_datalake import SmartDatalake
label_desc: Use image node_id 15 for calling the TestAgent obj's underlying member method code with example usage: obj.test_call_prompt_max_retry_on_error(agent) without return types