function getSchemaPath(schema, name) {
  let tree = schemaTree(schema, 0, [])
  const path = [tree]
  for (const part of name) {
    const child = tree.children.find(child => child.element.name === part)
    if (!child) throw new Error(`parquet schema element not found: ${name}`)
    path.push(child)
    tree = child
  }
  return path
}
Get schema elements from the root to the given element name.

@param {SchemaElement[]} schema
@param {string[]} name path to the element
@returns {SchemaTree[]} list of schema elements