function maybeRemoveId(subdoc, assignmentOpts) {
  if (subdoc != null && assignmentOpts.excludeId) {
    if (typeof subdoc.$__setValue === 'function') {
      delete subdoc._doc._id;
    } else {
      delete subdoc._id;
    }
  }
}
Remove _id from `subdoc` if user specified "lean" query option
@param {Document} subdoc
@param {Object} assignmentOpts
@api private