<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_module_definition(self, module_definition):
 """ Add a ModuleDefinition to the document """

        if module_definition.identity not in self._module_definitions.keys():
            self._module_definitions[module_definition.identity] = module_definition
        else:
            raise ValueError("{} has already been defined".format(module_definition.identity))