code: def to_bqm(self, model):
          
          linear = ((v, float(model.get_py_value(bias)))
                    for v, bias in self.linear.items())
          quadratic = ((u, v, float(model.get_py_value(bias)))
                       for (u, v), bias in self.quadratic.items())
          offset = float(model.get_py_value(self.offset))
  
          return dimod.BinaryQuadraticModel(linear, quadratic, offset, dimod.SPIN)
docs: Given a pysmt model, return a bqm.
  
          Adds the values of the biases as determined by the SMT solver to a bqm.
  
          Args:
              model: A pysmt model.
  
          Returns:
              :obj:`dimod.BinaryQuadraticModel`