<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_component_definition(self, definition):
 """ Add a ComponentDefinition to the document """

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