docs: function postFinaliseBatch(batch, context) {
    const task = this;
    // const finalisingTask = task.parent;
  
    // Look up the actual function to be used to do the post-finalise batch logic (if any)
    const postFinaliseBatchFn = Settings.getPostFinaliseBatchFunction(context);
  
    if (!postFinaliseBatchFn) {
      if (context.traceEnabled) context.trace(`Skipping post-finalise of ${batch.describe()}, since no postFinaliseBatch function configured`);
      return Promise.resolve(undefined);
    }
  
    // Create a task to be used to execute and track the configured postFinaliseBatch function
    const fnName = isNotBlank(postFinaliseBatchFn.name) ? postFinaliseBatchFn.name : 'postFinaliseBatch';
    const postFinaliseBatchTask = task.createSubTask(fnName, postFinaliseBatchFn, batchSettings, finaliseTaskOpts);
  
    // Pre-finalise the batch
    const p = postFinaliseBatchTask.execute(batch, context);
    return whenDone(postFinaliseBatchTask, p, undefined, context).then(
      // return Promises.try(() => preFinaliseBatchTask.execute(batch, context)).then(
      () => {
        context.debug(`Post-finalised ${batch.describe()}`);
        return batch;
      },
      err => {
        context.error(`Failed to post-finalise ${batch.describe()}`, err);
        throw err;
      }
    );
  }