code: def _get_flags_for_module(module):
      """Get all of the flags defined in the specified module.
  
      This is very slow, but should be authoritative - so we use it in a test and
      rely on the SERVER_FLAGS list instead at runtime.
  
      Args:
        module: the module to get flags from
  
      Returns:
        dict mapping flag names (string) to values (various types).
      """
      ret = {}
      for name, value in FLAGS.flag_values_dict().items():
          if FLAGS.find_module_defining_flag(name) == module.__name__:
              ret[name] = value
      return ret
  
file_path: lit/lit_nlp/server_flags_test.py
imports: from absl import flags
  from absl.testing import absltest
  from lit_nlp import server_config
  from lit_nlp import server_flags
label_desc: Use image node_id 1 for calling a global function with example usage: _get_flags_for_module(module) and returns: ret