code: def __call__(
      self,
      task_state: TaskState,
      **kwargs,
  ) -> SolverResult:
      # Reasoning step
      cot_pre = self.cot_pre_template.format(
          instructions=task_state.task_description
      )
      cot_post = self.cot_post_template
      msgs = []
      if cot_pre != "":
          msgs.append({"role": "system", "content": cot_pre})
      msgs += [msg.to_dict() for msg in task_state.messages]
      if cot_post != "":
          msgs.append({"role": "system", "content": cot_post})
      reasoning_output = self.cot_completion_fn(
          prompt=msgs, **kwargs
      ).get_completions()[0]
  
      # Extract answer step
      msgs = msgs + [
          {"role": "assistant", "content": reasoning_output},
          {"role": "assistant", "content": self.extract_template},
      ]
      extracted_answer = self.extract_completion_fn(
          prompt=msgs, **kwargs
      ).get_completions()[0]
  
      return SolverResult(
          output=extracted_answer,
          reasoning_output=reasoning_output,
      )
  
file_path: evals/evals/elsuite/self_prompting/solvers/custom_cot_solver.py
imports: from typing import Any, Dict, Optional
  from evals.completion_fns.openai import OpenAIChatCompletionFn
  from evals.solvers.solver import OpenAISolver, SolverResult
  from evals.task_state import TaskState
label_desc: Use image node_id 2 for calling the CustomCoTSolver obj's underlying member method code with example usage: obj.__call__(task_state) and returns: SolverResult