docstr: Apply framework output scalars to opdef main modules.
docstr_tok: ["Apply","framework","output","scalars","to","opdef","main","modules","."]
code: def python_script_opdef_loaded(self, opdef):
      """Apply framework output scalars to opdef main modules."""
  
      if opdef.output_scalars is not None:
          return
  
      script = _python_script_for_opdef_main(opdef)
      if not script:
          return
  
      framework = _framework_for_script(script)
      if not framework:
          return
  
      self.log.debug(
          "applying %s framework output scalars to %s",
          framework.name,
          opdef,
      )
      opdef.output_scalars = framework.output_scalars
  
imports: import os
  import re
  from guild import config
  from guild import op_util
  from guild import plugin
  from guild import python_util
  from guild import summary
  from .python_script import PythonScriptModelProxy
  from .python_script import PythonScriptOpdefSupport
label_desc: Use image node_id 2 for calling the PythonFrameworksPlugin obj's underlying member method code with example usage: obj.python_script_opdef_loaded(opdef) without return types