code: def set_bug(self, bug_number):
          
          if bug_number == self.bug_number:
              return self
  
          other = ClassifiedFailure.objects.filter(bug_number=bug_number).first()
          if not other:
              self.bug_number = bug_number
              self.save(update_fields=['bug_number'])
              return self
  
          self.replace_with(other)
  
          return other
docs: Set the bug number of this Classified Failure
  
          If an existing ClassifiedFailure exists with the same bug number
          replace this instance with the existing one.