class Function:
    def __init__(self):
        pass
        
    def render(self, *args) -> str:
        pass

    def parse(self, output: str) -> Any:
        return output

class Backend(Proto):
    async def run(self, inp: str)-> str: ...

class Bot:
    def __init__(self, backend: Backend):
        self.backend = backend

    async def __call__(self, fn) -> Any:
        prompt = fn.render()
        result = await self.backend.run(prompt)
        return fn.parse(result)
    
def composite(fn):
    return lambda *args: async lambda bot: return fn(bot, *args)

def simple(fn):
    class TempFunction(Function):
        def render(self):
            return fn(output)
    return TempFunction


