docs: function validateAssignments(assignments) {
      // We will only throw this Error if assignments doesn't validate.
      // We pre-create it here just to DRY.
      let assignmentError = new Error(
          'Must provide either an array topic names, or ' +
          ' an array of objects with topic, partition and offset|timestamp.'
      );
      assignmentError.assignments = assignments;
  
      if (!_.isArray(assignments) || _.isEmpty(assignments)) {
          throw assignmentError;
      }
  
      // Every assignement must either be...
      if (!assignments.every((a) => (
              // a string topic name
              _.isString(a) || (
              // or a an assignment object
                  _.isPlainObject(a)          &&
                  _.isString(a.topic)         &&
                  _.isInteger(a.partition)    &&
                  (_.isInteger(a.offset) || _.isInteger(a.timestamp))
              )
      ))) {
          throw assignmentError;
      }
  
      return true;
  }