from abc import ABC, abstractmethod
from datetime import date, datetime
from typing import Any, Dict, List, Optional, Type, Callable, TypeVar
from {{ types_module }} import *
from {{ api_module }} import *

class IToolInvoker(ABC):
    T = TypeVar("T")
    @abstractmethod
    def invoke(self, toolname: str, arguments: Dict[str, Any], return_type: Type[T])->T:
        ...


class {{ class_name }}({{ api_cls_name }}):

    def __init__(self, delegate: IToolInvoker):
        self._delegate = delegate

{% for method in methods %}
    def {{ method.name }}{{ method.signature }}:
        {% if method.doc %}"""{{ method.doc }}"""{% endif %}
        {{ method.body }}
{% endfor %}