code: def random_poly(x, n, inf, sup, domain=ZZ, polys=False):
      """Generates a polynomial of degree ``n`` with coefficients in
      ``[inf, sup]``.
  
      Parameters
      ----------
      x
          `x` is the independent term of polynomial
      n : int
          `n` decides the order of polynomial
      inf
          Lower limit of range in which coefficients lie
      sup
          Upper limit of range in which coefficients lie
      domain : optional
           Decides what ring the coefficients are supposed
           to belong. Default is set to Integers.
      polys : bool, optional
          ``polys=True`` returns an expression, otherwise
          (default) returns an expression.
      """
      poly = Poly(dup_random(n, inf, sup, domain), x, domain=domain)
  
      return poly if polys else poly.as_expr()
  
imports: from sympy.core import Add, Mul, Symbol, sympify, Dummy, symbols
  from sympy.core.containers import Tuple
  from sympy.core.singleton import S
  from sympy.ntheory import nextprime
  from sympy.polys.densearith import dmp_add_term, dmp_neg, dmp_mul, dmp_sqr
  from sympy.polys.densebasic import dmp_zero, dmp_one, dmp_ground, dup_from_raw_dict, dmp_raise, dup_random
  from sympy.polys.domains import ZZ
  from sympy.polys.factortools import dup_zz_cyclotomic_poly
  from sympy.polys.polyclasses import DMP
  from sympy.polys.polytools import Poly, PurePoly
  from sympy.polys.polyutils import _analyze_gens
  from sympy.utilities import subsets, public, filldedent
  from sympy.polys.rings import ring
label_desc: Use image node_id 4 for calling a global function with example usage: random_poly(x, n, inf, sup, domain, polys) and returns: unknown