code: function generateAndSetMD5s(message, record, userRecord, state, context) {
    // Get the generateMD5s function to use
    const generateMD5s = settings.getGenerateMD5sFunction(context);
  
    if (!generateMD5s) {
      const errMsg = `FATAL - Cannot generate MD5s, since no 'generateMD5s' function is configured. Configure one & redeploy ASAP!`;
      context.error(errMsg);
      throw new FatalError(errMsg);
    }
  
    // Generate the MD5 message digest(s)
    const md5s = generateMD5s(message, record, userRecord) || {};
  
    // Set the generated MD5 message digest(s) on the given message's state or unusable record's state
    setMD5s(state, md5s);
  
    return md5s;
  }
docs: Generates MD5 message digest(s) for the given message, its record and its optional user record using the configured
  `generateMD5s` function and then updates the given message's or unusable record's state with the generate MD5s.
  @param {Message} message - the message for which to generate MD5 message digest(s)
  @param {Record} record - the record for which to generate MD5 message digest(s)
  @param {UserRecord|undefined} [userRecord] - the optional user record (if applicable) for which to generate MD5 message digest(s)
  @param {MessageState|UnusableRecordState} state - the message's or unusable record's tracked state to update with the generated MD5s
  @param {StreamConsumerContext} context - the context to use
  @param {GenerateMD5s} [context.streamProcessing.generateMD5s]
  @return {MD5s} the generated MD5 message digest(s)