code: def register_key_flag_for_module(self, module_name, flag):
      
      key_flags_by_module = self.key_flags_by_module_dict()
      # The list of key flags for the module named module_name.
      key_flags = key_flags_by_module.setdefault(module_name, [])
      # Add flag, but avoid duplicates.
      if flag not in key_flags:
        key_flags.append(flag)
docs: Specifies that a flag is a key flag for a module.
  
      Args:
        module_name: str, the name of a Python module.
        flag: Flag, the Flag instance that is key to the module.