function getNameFromNode(node) {
  if (node.type === 'Identifier') {
    return node.name
  } else if (node.type === 'ThisExpression') {
    return 'this'
  } else if (node.type === 'PrivateName') {
    return `#${node.id.name}`
  } else {
    throw new Error(
      `unknown ast node type when trying to get name: "${node.type}"`
    )
  }
}
@param {import('@babel/types').Node} node
@returns {string}