#NEWLINE# def _load_metaconfigs_from_one_dependency( dependency_name ) : #NEWLINE# #INDENT# ' Load the metaconfigs from one dependency and finally from S3\n    It does 3 things:\n    1. Set children watch on dependencies. If the root dependency contains other\n     dependencies, set watchers.\n    2. Set znode watch on each MetaConfig Znode\n    3. Load the MetaConfig content from S3 using S3Utils.\n\n    If dependency/metaconfig does not exist, log and skip.\n    ' #NEWLINE# if ( dependency_name in _WATCHED_DEPENDENCIES ) : #NEWLINE# #INDENT# log . info ( ( 'Dependency %s already watched' % dependency_name ) ) #NEWLINE# return #NEWLINE# #UNINDENT# dependency_zk_path = DEPENDENCY_ZK_PATH_FORMAT . format ( dependency_name ) #NEWLINE# if ( not _kazoo_client ( ZK_HOSTS ) . exists ( dependency_name ) ) : #NEWLINE# #INDENT# log . error ( ( 'The dependency %s does not exist' % dependency_zk_path ) ) #NEWLINE# return #NEWLINE# #UNINDENT# log . info ( ( 'Watching dependency %s' % dependency_name ) ) #NEWLINE# _kazoo_client ( ZK_HOSTS ) . ChildrenWatch ( dependency_zk_path , update_dependency ) #NEWLINE# _WATCHED_DEPENDENCIES . add ( dependency_name )