filterNodes = (node) => {
  if (node.type === 'Identifier') {
    // if the node has a name, keep it
    return node.name;
  }
  if (node.type === 'JSXElement' || node.type === 'TaggedTemplateExpression') {
    // always keep interpolated elements or other tagged template literals like a nested date`` inside a plural``
    return true;
  }
  if (node.type === 'TemplateElement') {
    // return the "cooked" (escaped) text for the text in the template literal (`, ::percent` in number`${varname}, ::percent`)
    return node.value.cooked;
  }
  // unknown node type, ignore
  return false;
}
filter the list of nodes within a tagged template literal to the 4 types we can process,
and ignore anything else.

this is a helper function for `extractVariableNamesFromQuasiNodes`