<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_namespace(self, namespace, module):
 """ Register a namespace. :param namespace: Namespace tag. :type namespace: str :param module: must be a string or a module object to register. :type module: str """

        if namespace in self._namespaces:
            raise AlreadyRegisteredError("Namespace '{0}' is already registered on loader.".format(namespace))

        self._namespaces[namespace] = module