code: def from_hising(cls, h, J, offset=None):
          
          poly = {(k,): v for k, v in h.items()}
          poly.update(J)
          if offset is not None:
              poly[frozenset([])] = offset
          return cls(poly, Vartype.SPIN)
docs: Construct a binary polynomial from a higher-order Ising problem.
  
          Args:
              h (dict):
                  The linear biases.
  
              J (dict):
                  The higher-order biases.
  
              offset (optional, default=0.0):
                  Constant offset applied to the model.
  
          Returns:
              :obj:`.BinaryPolynomial`
  
          Examples:
              >>> poly = dimod.BinaryPolynomial.from_hising({'a': 2}, {'ab': -1}, 0)