code: def polyval(p: Array, x: Array, *, unroll: int = 16) -> Array:
      check_arraylike("polyval", p, x)
      p, x = promote_dtypes_inexact(p, x)
      shape = lax.broadcast_shapes(p.shape[1:], x.shape)
      y = lax.full_like(x, 0, shape=shape, dtype=x.dtype)
      y, _ = lax.scan(
          lambda y, p: (y * x + p, None), y, p, unroll=unroll
      )
      return y
  
imports: from __future__ import annotations
  from functools import partial
  import operator
  import numpy
  from jax import jit
  from jax import lax
  from jax._src import dtypes
  from jax._src import core
  from jax._src.numpy.lax_numpy import arange, argmin, array, asarray, atleast_1d, concatenate, convolve, diag, dot, finfo, full, ones, outer, roll, trim_zeros, trim_zeros_tol, vander, zeros
  from jax._src.numpy.ufuncs import maximum, true_divide, sqrt
  from jax._src.numpy.reductions import all
  from jax._src.numpy import linalg
  from jax._src.numpy.util import check_arraylike, promote_dtypes, promote_dtypes_inexact, _where, _wraps
  from jax._src.typing import Array, ArrayLike
label_desc: Use image node_id 6 for calling a global function with example usage: polyval(p, x) and returns: y