code: def average_pool(
      inputs,
      pool_size,
      strides,
      padding,
      data_format=None,
  ):
      data_format = standardize_data_format(data_format)
      num_spatial_dims = inputs.ndim - 2
      pool_size = _convert_to_spatial_operand(
          pool_size, num_spatial_dims, data_format
      )
      strides = pool_size if strides is None else strides
      strides = _convert_to_spatial_operand(
          strides, num_spatial_dims, data_format
      )
  
      pooled = _pool(inputs, 0.0, lax.add, pool_size, strides, padding)
      if padding == "valid":
          # Avoid the extra reduce_window.
          return pooled / np.prod(pool_size)
      else:
          # Count the number of valid entries at each input point, then use that
          # for computing average. Assumes that any two arrays of same shape will
          # be padded the same. Avoid broadcasting on axis where pooling is
          # skipped.
          shape = [
              (a if b != 1 else 1)
              for (a, b) in zip(inputs.shape, pool_size)
          ]
          window_counts = _pool(
              jnp.ones(shape, inputs.dtype),
              0.0,
              lax.add,
              pool_size,
              strides,
              padding,
          )
          return pooled / window_counts
  
imports: import jax
  import jax.numpy
  import numpy
  from jax import lax
  from jax import nn
  from keras.backend import standardize_data_format
  from keras.backend import standardize_dtype
  from keras.backend.common.backend_utils import compute_conv_transpose_padding_args_for_jax
  from keras.backend.config import epsilon
  from keras.backend.jax.core import cast
  from keras.backend.jax.core import convert_to_tensor
label_desc: Use image node_id 20 for calling a global function with example usage: average_pool(inputs, pool_size, strides, padding, data_format) and returns: unknown, unknown