code: function restoreFunctionNames(ast) {
    const functionNames = [];
  
    t.traverse(ast, {
      FunctionNameMetadata({ node }) {
        functionNames.push({
          name: node.value,
          index: node.index
        });
      }
    });
  
    if (functionNames.length === 0) {
      return;
    }
  
    t.traverse(ast, {
      Func({ node }: NodePath<Func>) {
        // $FlowIgnore
        const nodeName: Identifier = node.name;
        const indexBasedFunctionName = nodeName.value;
        const index = Number(indexBasedFunctionName.replace("func_", ""));
        const functionName = functionNames.find(f => f.index === index);
        if (functionName) {
          const oldValue = nodeName.value;
  
          nodeName.value = functionName.name;
          nodeName.numeric = oldValue;
  
          // $FlowIgnore
          delete nodeName.raw;
        }
      }
docs: traverses the AST, locating function name metadata, which is then used to update index-based identifiers with function names