function getMaxRepetitionLevel(schemaPath) {
  let maxLevel = 0
  for (const { element } of schemaPath) {
    if (element.repetition_type === 'REPEATED') {
      maxLevel++
    }
  }
  return maxLevel
}
Get the max repetition level for a given schema path.

@param {SchemaTree[]} schemaPath
@returns {number} max repetition level