code: def get_directive_defaults():
      # To add an item to this list, all accesses should be changed to use the new
      # directive, and the global option itself should be set to an instance of
      # ShouldBeFromDirective.
      for old_option in ShouldBeFromDirective.known_directives:
          value = globals().get(old_option.options_name)
          assert old_option.directive_name in _directive_defaults
          if not isinstance(value, ShouldBeFromDirective):
              if old_option.disallow:
                  raise RuntimeError(
                      "Option '%s' must be set from directive '%s'"
                      % (
                          old_option.option_name,
                          old_option.directive_name,
                      )
                  )
              else:
                  # Warn?
                  _directive_defaults[old_option.directive_name] = value
      return _directive_defaults
  
file_path: catboost/contrib/tools/cython/Cython/Compiler/Options.py
imports: from __future__ import absolute_import
label_desc: Use image node_id 1 for calling a global function with example usage: get_directive_defaults() and returns: _directive_defaults