call context.done() in def_function()