code: def register_flag_by_module_id(self, module_id, flag):
      
      flags_by_module_id = self.flags_by_module_id_dict()
      flags_by_module_id.setdefault(module_id, []).append(flag)
docs: Records the module that defines a specific flag.
  
      Args:
        module_id: int, the ID of the Python module.
        flag: Flag, the Flag instance that is key to the module.