code: def remove_interaction(self, u, v):
          
  
          try:
              del self.quadratic[(u, v)]
          except KeyError:
              return  # no interaction with that name
  
          try:
              # invalidates counterpart
              del self._counterpart
              if self.vartype is not Vartype.BINARY and hasattr(self, '_binary'):
                  del self._binary
              elif self.vartype is not Vartype.SPIN and hasattr(self, '_spin'):
                  del self._spin
          except AttributeError:
              pass
docs: Remove interaction of variables u, v from a binary quadratic model.
  
          Args:
              u (variable):
                  One of the pair of variables in the binary quadratic model that
                  has an interaction.
  
              v (variable):
                  One of the pair of variables in the binary quadratic model that
                  has an interaction.
  
          Notes:
              Any interaction not in the binary quadratic model is ignored.
  
          Examples:
              This example creates an Ising model with three variables that has interactions
              between two, and then removes an interaction.
  
              >>> import dimod
              ...
              >>> bqm = dimod.BinaryQuadraticModel({}, {('a', 'b'): -1.0, ('b', 'c'): 1.0}, 0.0, dimod.SPIN)
              >>> bqm.remove_interaction('b', 'c')
              >>> ('b', 'c') in bqm.quadratic
              False
              >>> bqm.remove_interaction('a', 'c')  # not an interaction, so ignored
              >>> len(bqm.quadratic)
              1