function isImportAttributeKey(node) {
	const { parent } = node;

	// static import/re-export
	if (parent.type === "ImportAttribute" && parent.key === node) {
		return true;
	}

	// dynamic import
	if (
		parent.type === "Property" &&
		!parent.computed &&
		(parent.key === node ||
			(parent.value === node && parent.shorthand && !parent.method)) &&
		parent.parent.type === "ObjectExpression"
	) {
		const objectExpression = parent.parent;
		const objectExpressionParent = objectExpression.parent;

		if (
			objectExpressionParent.type === "ImportExpression" &&
			objectExpressionParent.options === objectExpression
		) {
			return true;
		}

		// nested key
		if (
			objectExpressionParent.type === "Property" &&
			objectExpressionParent.value === objectExpression
		) {
			return isImportAttributeKey(objectExpressionParent.key);
		}
	}

	return false;
}
Checks if a node is used as an import attribute key, either in a static or dynamic import.
@param {ASTNode} node The node to check.
@returns {boolean} Whether the node is used as an import attribute key.