code: def average_pooling_1d(x, ksize, stride=None, pad=0, pad_value=0):
      """1-dimensional spatial average pooling function.
  
      .. warning::
  
          This feature is experimental. The interface can change in the future.
  
      .. note::
  
          This function calls :func:`~chainer.functions.average_pooling_nd`
          internally, so see the details of the behavior in
          the documentation of :func:`~chainer.functions.average_pooling_nd`.
  
      """
      if len(x.shape[2:]) != 1:
          raise ValueError(
              "The number of dimensions under channel dimension of the input "
              "'x' should be 1. But the actual ndim was {}.".format(
                  len(x.shape[2:])
              )
          )
      return average_pooling_nd(x, ksize, stride, pad, pad_value)
  
imports: import functools
  import operator
  import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.functions.pooling import average_pooling_nd_kernel
  from chainer.functions.pooling import pooling_nd
  from chainer.utils import conv
  from chainer.utils import conv_nd
  import chainerx
label_desc: Use image node_id 3 for calling a global function with example usage: average_pooling_1d(x, ksize, stride, pad, pad_value) and returns: average_pooling_nd