def delete_instance(self, instance, using_transactions=True, dry_run=False):
self.before_delete_instance(instance, dry_run)<EOL>if not using_transactions and dry_run:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>instance.delete()<EOL><DEDENT>self.after_delete_instance(instance, dry_run)<EOL>
Calls :meth:`instance.delete` as long as ``dry_run`` is not set.