def _setup(text):
 root = text._root()
 engine = searchengine.get(root)
 if (not hasattr(engine, '_searchdialog')):
  engine._searchdialog = SearchDialog(root, engine)
 return engine._searchdialog

def _setup ( text ) : root = text . _root ( ) engine = searchengine . get ( root ) if ( not hasattr ( engine , '_searchdialog' ) ) : engine . _searchdialog = SearchDialog ( root , engine ) return engine . _searchdialog
prepare and global state and updates it with command line options .