code: def nanmean(
      a, axis=None, dtype=None, out=None, keepdims=False, *, where=None
  ):
      axis = tuple(axis) if isinstance(axis, list) else axis
      if dtype is None:
          dtype = "float64" if ivy.is_int_dtype(a) else a.dtype
      if ivy.is_array(where):
          where1 = ivy.array(where, dtype=ivy.bool)
          a = ivy.where(where1, a, ivy.full_like(a, ivy.nan))
      nan_mask1 = ivy.isnan(a)
      not_nan_mask1 = ~ivy.isnan(a)
      b1 = ivy.where(ivy.logical_not(nan_mask1), a, ivy.zeros_like(a))
      array_sum1 = ivy.sum(
          b1, axis=axis, dtype=dtype, keepdims=keepdims, out=out
      )
      not_nan_mask_count1 = ivy.sum(
          not_nan_mask1,
          axis=axis,
          dtype=dtype,
          keepdims=keepdims,
          out=out,
      )
      count_zero_handel = ivy.where(
          not_nan_mask_count1 != 0,
          not_nan_mask_count1,
          ivy.full_like(not_nan_mask_count1, ivy.nan),
      )
      return ivy.divide(array_sum1, count_zero_handel)
  
imports: import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back, handle_jax_dtype
  from ivy.functional.frontends.jax.numpy import promote_types_of_jax_inputs
  from ivy.functional.backends.jax.experimental.elementwise import _normalize_axis_tuple
label_desc: Use image node_id 17 for calling a global function with example usage: nanmean(a, axis, dtype, out, keepdims) and returns: ivy