code: def register_key_flags_in_core(f):
      """Defines a function in core.py, and registers its key flags.
  
      absl uses the location of a flags.declare_key_flag() to determine the context
      in which a flag is key. By making all declares in core, this allows model
      main functions to call flags.adopt_module_key_flags() on core and correctly
      chain key flags.
  
      Args:
        f:  The function to be wrapped
  
      Returns:
        The "core-defined" version of the input function.
      """
  
      def core_fn(*args, **kwargs):
          key_flags = f(*args, **kwargs)
          [
              flags.declare_key_flag(fl) for fl in key_flags
          ]  # pylint: disable=expression-not-assigned
  
      return core_fn
  
file_path: autodist/examples/benchmark/utils/flags/core.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  from six.moves import shlex_quote
  from absl import app
  from absl import flags
  from utils.flags import _base
  from utils.flags import _benchmark
  from utils.flags import _conventions
  from utils.flags import _device
  from utils.flags import _distribution
  from utils.flags import _misc
  from utils.flags import _performance
label_desc: Use image node_id 3 for calling a global function with example usage: register_key_flags_in_core(f) and returns: core_fn