docs: function renameIdentifier(ast, oldName, newName, defNode) {
    // Summary:
    //  Rename identifiers with oldName in ast
    const changes = [];
    if (!defNode) {
      let scope;
      traverse(ast, {
        Identifier(path) {
          if (path.node.name === oldName) {
            scope = path.scope;
            path.stop();
          }
        },
      });
      if (!scope) return changes;
      defNode = getDefNode(oldName, scope);
    }
  
    function rename(path) {
      if (
        path.node.name === oldName &&
        path.key !== 'imported' && // it should NOT be imported specifier
        getDefNode(path.node.name, path.scope) === defNode
      ) {
        path.node.name = newName;
        changes.push({
          start: path.node.start,
          end: path.node.end,
          replacement: newName,
        });
      }
    }
    traverse(ast, {
      JSXIdentifier: rename,
      Identifier: rename,
    });
    return changes;
  }