randomizeIds = function (enableRandomization, currentDrawing) {
  randIds =
    enableRandomization === false
      ? RandomizeModes.NEVER_RANDOMIZE
      : RandomizeModes.ALWAYS_RANDOMIZE

  if (
    randIds === RandomizeModes.ALWAYS_RANDOMIZE &&
    !currentDrawing.getNonce()
  ) {
    currentDrawing.setNonce(Math.floor(Math.random() * 100001))
  } else if (
    randIds === RandomizeModes.NEVER_RANDOMIZE &&
    currentDrawing.getNonce()
  ) {
    currentDrawing.clearNonce()
  }
}
Called to ensure that drawings will or will not have randomized ids.
The currentDrawing will have its nonce set if it doesn't already.
@function module:draw.randomizeIds
@param {boolean} enableRandomization - flag indicating if documents should have randomized ids
@param {draw.Drawing} currentDrawing
@returns {void}