code: def set_energy_upperbound(self, spins, offset=0):
          
          spin_energy = self.energy_upperbound(spins)
          self.assertions.add(GE(spin_energy, self.gap + offset))
docs: Upper bound the energy of Theta with spins fixed to be greater than (gap + offset).
  
          Args:
              spins (dict): Spin values for a subset of the variables in Theta.
              offset (float): A value that is added to the upper bound. Default value is 0.
  
          Notes:
              Add equality constraint to assertions.