docs: function validateTaskDefinitions(processOneTaskDefs, processAllTaskDefs, context) {
    function validateTaskDefs(taskDefs, name) {
      if (taskDefs) {
        // Must be an array of executable TaskDef instances with valid execute functions
        if (!Arrays.isArrayOfType(taskDefs, TaskDef) || !taskDefs.every(t => t && t.executable && typeof t.execute === 'function')) {
          // This Lambda is unusable, so trigger an exception to put all records back until it can be fixed!
          const errMsg = `FATAL - ${name} must be an array of executable TaskDef instances with valid execute functions! Fix your Lambda and redeploy ASAP, since this issue is blocking all of your stream's shards!`;
          context.error(errMsg);
          throw new FatalError(errMsg);
        }
        // All of the task definitions must have unique names
        const taskNames = taskDefs.map(d => d.name);
        if (!Arrays.isDistinct(taskNames)) {
          // This Lambda is unusable, so trigger an exception to put all records back until it can be fixed!
          const errMsg = `FATAL - ${name} must have no duplicate task names ${stringify(taskNames)}! Fix your Lambda and redeploy ASAP, since this issue is blocking all of your stream's shards!`;
          context.error(errMsg);
          throw new FatalError(errMsg);
        }
      }
    }
  
    // Check that processOneTaskDefs (if defined) is an array of executable TaskDef instances with valid execute functions
    validateTaskDefs(processOneTaskDefs, 'processOneTaskDefs');
  
    // Check that processAllTaskDefs (if defined) is an array of executable TaskDef instances with valid execute functions
    validateTaskDefs(processAllTaskDefs, 'processAllTaskDefs');
  
    // Check that at least one task is defined across both processOneTaskDefs and processAllTaskDefs - otherwise no progress can be made at all!
    if ((!processOneTaskDefs || processOneTaskDefs.length <= 0) && (!processAllTaskDefs || processAllTaskDefs.length <= 0)) {
      // This Lambda is useless, so trigger an exception to put all records back until it can be fixed!
      const errMsg = `FATAL - There must be at least one task definition in either of processOneTaskDefs or processAllTaskDefs! Fix your Lambda and redeploy ASAP, since this issue is blocking all of your stream's shards!`;
      context.error(errMsg);
      throw new FatalError(errMsg);
    }
  
    // Check that all task definitions across both processOneTaskDefs and processOneTaskDefs are distinct (i.e. any given task
    // definition must NOT appear in both lists)
    const allTaskDefs = (processOneTaskDefs ? processOneTaskDefs : []).concat(processAllTaskDefs ? processAllTaskDefs : []);
    if (!Arrays.isDistinct(allTaskDefs)) {
      // This Lambda is useless, so trigger an exception to put all records back until it can be fixed!
      const errMsg = `FATAL - Any given task definition must NOT exist in both processOneTaskDefs and processAllTaskDefs! Fix your Lambda and redeploy ASAP, since this issue is blocking all of your stream's shards!`;
      context.error(errMsg);
      throw new FatalError(errMsg);
    }
  }