docs: function extractAndSequenceMessages(batch, context) {
    // const task = this;
    const records = batch.records;
  
    // Get the configured extractMessagesFromRecord function to be used to do the actual extraction
    const extractMessagesFromRecord = Settings.getExtractMessagesFromRecordFunction(context);
    const extractMessageFromRecord = Settings.getExtractMessageFromRecordFunction(context);
  
    if (!extractMessagesFromRecord) {
      // No extract function available - should never get here, since validation of configuration should catch this case earlier on
      const errMsg = `FATAL - Cannot extract any messages for batch (${batch.shardOrEventID}) WITHOUT a valid, configured extractMessagesFromRecord function`;
      context.error(errMsg);
      return Promise.reject(new FatalError(errMsg));
    }
  
    // Extract the message(s) from the records using the configured `extractMessagesFromRecord` & optional `extractMessageFromRecord` functions
    // Convert all of the event's records back into their original message object forms
    const extractPromises = records.map(record =>
      extractMessagesFromStreamEventRecord(record, batch, extractMessagesFromRecord, extractMessageFromRecord, context)
    );
  
    return Promises.every(extractPromises, undefined, context).then(
      outcomes => {
        if (context.debugEnabled) {
          context.debug(`Finished extracting messages for ${batch.describe(true)} - ${Try.describeSuccessAndFailureCounts(outcomes)}`);
        }
  
        // Rethrow any FatalError
        const fatal = outcomes.find(o => isInstanceOf(o, Failure) && isInstanceOf(o.error, FatalError));
        if (fatal) {
          throw fatal.error;
        }
  
        // At this point all messages have been extracted and added to the batch's list of messages, so next ...
        // Resolve the sequence in which the messages must be processed & set batch.firstMessagesToProcess
        batch.firstMessagesToProcess = sequencing.sequenceMessages(batch, context);
        return outcomes;
      },
      err => {
        context.error(`Unexpected error during extraction of messages for ${batch.describe(true)})`, err);
        throw err;
      }
    );
  }