code: def nanmedian(
      input: JaxArray,
      /,
      *,
      axis: Optional[Union[Tuple[int], int]] = None,
      keepdims: bool = False,
      overwrite_input: bool = False,
      out: Optional[JaxArray] = None,
  ) -> JaxArray:
      if isinstance(axis, list):
          axis = tuple(axis)
  
      if overwrite_input:
          copied_input = input.copy()
          overwrite_input = False
          out = None
          return jnp.nanmedian(
              copied_input,
              axis=axis,
              keepdims=keepdims,
              overwrite_input=overwrite_input,
              out=out,
          )
  
      return jnp.nanmedian(
          input,
          axis=axis,
          keepdims=keepdims,
          overwrite_input=False,
          out=None,
      )
  
imports: import jax.numpy
  from typing import Optional, Union, Tuple, Sequence
  from ivy.functional.backends.jax import JaxArray
  import jax.lax
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
  from ..statistical import _infer_dtype
label_desc: Use image node_id 8 for calling a global function with example usage: nanmedian() and returns: jnp, jnp