function isInFunctionDeclaration(nodePath) {
  let target = nodePath.parentPath
  while (target) {
    // if function declaration found, short-circuit instead of continuing
    if (target.isFunctionDeclaration() || target.isFunctionExpression()) {
      return true
    }
    target = target.parentPath
  }
  return false
}
Determines if this `Node` is a descendant of a `FunctionDeclaration` or
`FunctionExpression`.

@param {import('@babel/traverse').NodePath<any>} nodePath
@returns {boolean}