<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_hising(cls, h, J, offset=None):
 """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 = {(k,): v for k, v in h.items()}
        poly.update(J)
        if offset is not None:
            poly[frozenset([])] = offset
        return cls(poly, Vartype.SPIN)