# Some function we'll call
@inngest_client.create_function(
    fn_id="compute-square",
    trigger=inngest.TriggerEvent(event="calculate/square")
)
async def compute_square(ctx: inngest.Context):
    return {"result": ctx.event.data["number"] * ctx.event.data["number"]}  # Result typed as { result: number }