def wait_for_xmodules_to_load():
 callback = '\n        if (modules[0] && modules[0].done) {{\n            modules[0].done(function () {{callback(true)}});\n        }}\n    '
 return load_requrejs_modules(['xmodule'], callback)

def wait_for_xmodules_to_load ( ) : callback = '\n        if (modules[0] && modules[0].done) {{\n            modules[0].done(function () {{callback(true)}});\n        }}\n    ' return load_requrejs_modules ( [ 'xmodule' ] , callback )
if requirejs is loaded on the page .