code: def get_nondefault_flags_as_str():
      """Returns flags as a string that can be passed as command line arguments.
  
      E.g., returns: "--batch_size=256 --use_synthetic_data" for the following code
      block:
  
      ```
      flags.FLAGS.batch_size = 256
      flags.FLAGS.use_synthetic_data = True
      print(get_nondefault_flags_as_str())
      ```
  
      Only flags with nondefault values are returned, as passing default flags as
      command line arguments has no effect.
  
      Returns:
        A string with the flags, that can be passed as command line arguments to a
        program to use the flags.
      """
      nondefault_flags = _get_nondefault_flags_as_dict()
      flag_strings = []
      for name, value in sorted(nondefault_flags.items()):
          if isinstance(value, bool):
              flag_str = (
                  "--{}".format(name)
                  if value
                  else "--no{}".format(name)
              )
          elif isinstance(value, list):
              flag_str = "--{}={}".format(name, ",".join(value))
          else:
              flag_str = "--{}={}".format(name, value)
          flag_strings.append(flag_str)
      return " ".join(
          shlex_quote(flag_str) for flag_str in flag_strings
      )
  
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 5 for calling a global function with example usage: get_nondefault_flags_as_str() and returns: str