def METHOD_NAME(x, n, inf, sup, domain=ZZ, polys=False, percent=None):
    """Return a polynomial of degree ``n`` with coefficients in ``[inf, sup]``."""
    ring = domain.inject(x)
    poly = polytools.Poly(dict(ring._random(n, inf, sup, percent)), x, domain=domain)
    if not polys:
        return poly.as_expr()
    return poly