code: def ADOPT_module_key_flags(  # pylint: disable=g-bad-name
      module, flag_values=FLAGS):
    
    if not isinstance(module, types.ModuleType):
      raise Error('Expected a module object, not %r.' % (module,))
    # TODO(vrusinov): _GetKeyFlagsForModule should be public.
    _internal_declare_key_flags(
        [f.name for f in flag_values._GetKeyFlagsForModule(module.__name__)],  # pylint: disable=protected-access
        flag_values=flag_values)
    # If module is this flag module, take _helpers._SPECIAL_FLAGS into account.
    if module == _helpers.GetModuleObjectAndName(globals())[0]:
      _internal_declare_key_flags(
          # As we associate flags with _GetCallingModuleObjectAndName(), the
          # special flags defined in this module are incorrectly registered with
          # a different module.  So, we can't use _GetKeyFlagsForModule.
          # Instead, we take all flags from _helpers._SPECIAL_FLAGS (a private
          # FlagValues, where no other module should register flags).
          [f.name for f in six.itervalues(_helpers.SPECIAL_FLAGS.FlagDict())],
          flag_values=_helpers.SPECIAL_FLAGS,
          key_flag_values=flag_values)
docs: Declares that all flags key to a module are key to the current module.
  
    Args:
      module: A module object.
      flag_values: A FlagValues object.  This should almost never need
        to be overridden.
  
    Raises:
      Error: When given an argument that is a module name (a
      string), instead of a module object.