def tool_tag_manager(app):
 if (hasattr(app.config, 'get_bool') and app.config.get_bool('enable_tool_tags', False)):
  return PersistentToolTagManager(app)
 else:
  return NullToolTagManager()

def tool_tag_manager ( app ) : if ( hasattr ( app . config , 'get_bool' ) and app . config . get_bool ( 'enable_tool_tags' , False ) ) : return PersistentToolTagManager ( app ) else : return NullToolTagManager ( )
build a tool tag manager according to apps configuration and return it .