code: def avg_pool3d(
      x: JaxArray,
      kernel: Union[int, Tuple[int], Tuple[int, int, int]],
      strides: Union[int, Tuple[int], Tuple[int, int, int]],
      padding: Union[str, int, List[Tuple[int, int]]],
      /,
      *,
      data_format: str = "NDHWC",
      count_include_pad: bool = False,
      ceil_mode: bool = False,
      divisor_override: Optional[int] = None,
      out: Optional[JaxArray] = None,
  ) -> JaxArray:
      if isinstance(kernel, int):
          kernel = (kernel,) * 3
      elif len(kernel) == 1:
          kernel = (kernel[0],) * 3
  
      if isinstance(strides, int):
          strides = (strides,) * 3
      elif len(strides) == 1:
          strides = (strides[0],) * 3
  
      if data_format == "NCDHW":
          x = jnp.transpose(x, (0, 2, 3, 4, 1))
  
      res = general_pool(
          x,
          0.0,
          jlax.add,
          kernel,
          strides,
          padding,
          3,
          ceil_mode=ceil_mode,
      )
  
      if divisor_override is not None:
          divisor = divisor_override
      else:
          divisor = general_pool(
              jnp.ones_like(x, dtype=res.dtype),
              0.0,
              jlax.add,
              kernel,
              strides,
              padding,
              3,
              count_include_pad=count_include_pad,
              ceil_mode=ceil_mode,
          )
      res = res / divisor
  
      if data_format == "NCDHW":
          res = jnp.transpose(res, (0, 4, 1, 2, 3))
  
      return res
  
imports: from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
  import jax
  import jax.lax
  import jax.numpy
  import math
  import ivy
  from ivy import output_to_native_arrays
  from ivy.functional.backends.jax import JaxArray
  from ivy.functional.backends.jax.random import RNG
  from ivy.functional.ivy.experimental.general import _correct_ivy_callable
  from ivy.functional.ivy.layers import _handle_padding, _validate_max_pool_params, _depth_max_pooling_helper
  from ivy.functional.ivy.experimental.layers import _padding_ceil_mode, _get_size
  from ivy.func_wrapper import with_supported_dtypes
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
  from ivy.functional.backends.jax.experimental.manipulation import _to_nested_tuple
label_desc: Use image node_id 9 for calling a global function with example usage: avg_pool3d() and returns: res