def _fail_if_dependency_already_exists(self, key):
        if key in self._dependency_by_key:
            msg = 'Key already exists: %r.' % key
            detail = 'A DependencyMap does not support having multiple dependencies with the same key.'
            hint = ('Use DependencyMap.remove_dependency to remove the existing dependency'
                    'before adding a new dependency with the same key.')
            raise exceptions.KeyAlreadyExists(msg, detail, hint)
dataset/ETHPy150Open foundit/Piped/piped/dependencies.py/DependencyMap._fail_if_dependency_already_exists/original