<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_hising(self):
 """Construct a higher-order Ising problem from a binary polynomial. Returns: tuple: A 3-tuple of the form (`h`, `J`, `offset`) where `h` includes the linear biases, `J` has the higher-order biases and `offset` is the linear offset. Examples: {'a': -1} """

        if self.vartype is Vartype.BINARY:
            return self.to_spin().to_hising()

        h = {}
        J = {}
        offset = 0
        for term, bias in self.items():
            if len(term) == 0:
                offset += bias
            elif len(term) == 1:
                v, = term
                h[v] = bias
            else:
                J[tuple(term)] = bias

        return h, J, offset