Azure function – should the context be called after each loop or at the end

In an Azure function, let's say that I have:

const cosmosDBTrigger: AzureFunction = function async (context: context, documents: any type[]): To promise {
if (!! documents && documents.length> 0) {
documents.forEach (function (document) {
context.bindings.outputdocuments = document
// 1 - SHOULD IT GO?
});
}
// 2 - SHOULD IT GO?
}

Is the right place to place contexte.done to be in position 1 or 2. To know should be after each document in the loop at the end?

Thank you.