code: def from_hubo(cls, H, offset=None):
          
          poly = cls(H, Vartype.BINARY)
          if offset is not None:
              poly[()] = poly.get((), 0) + offset
          return poly
docs: Construct a binary polynomial from a higher-order unconstrained
          binary optimization (HUBO) problem.
  
          Args:
              H (dict):
                  Coefficients of a higher-order unconstrained binary optimization
                  (HUBO) model.
  
          Returns:
              :obj:`.BinaryPolynomial`
  
          Examples:
              >>> poly = dimod.BinaryPolynomial.from_hubo({('a', 'b', 'c'): -1})