function getMemberExpressionNesting(identifierNode, parents) {
  // remove the identifier node itself
  const parentsOnly = parents.slice(0, -1)
  // find unbroken membership chain closest to identifier
  const memberExpressions = getTailmostMatchingChain(
    /** @type {import('./inspectPrimordialAssignments').NonComputedMemberLikeExpression[]} */ (
      parentsOnly
    ),
    isNonComputedMemberLikeExpression
  ).reverse()
  // find parent of membership chain
  const hasMembershipChain = Boolean(memberExpressions.length)
  const topmostMember = hasMembershipChain
    ? memberExpressions[0]
    : identifierNode
  const topmostMemberIndex = parents.indexOf(topmostMember)
  if (topmostMemberIndex < 1) {
    throw Error('unnexpected value for memberTopIndex')
  }
  const topmostMemberParentIndex = topmostMemberIndex - 1
  const parentOfMembershipChain = parents[topmostMemberParentIndex]
  return { memberExpressions, parentOfMembershipChain, topmostMember }
}
@param {import('@babel/types').Node} identifierNode
@param {import('@babel/types').Node[]} parents
@returns