<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stop_replication(self, repl_id):
 """ Stops a replication based on the provided replication id by deleting the replication document from the replication database. The replication can only be stopped if it has not yet completed. If it has already completed then the replication document is still deleted from replication database. :param str repl_id: Replication id used to identify the replication to stop. """


        try:
            repl_doc = self.database[repl_id]
        except KeyError:
            raise CloudantReplicatorException(404, repl_id)

        repl_doc.fetch()
        repl_doc.delete()