code: def sem(
      a: ArrayLike,
      axis: int | None = 0,
      ddof: int = 1,
      nan_policy: str = "propagate",
      *,
      keepdims: bool = False,
  ) -> Array:
      (b,) = promote_args_inexact("sem", a)
      if axis is None:
          b = b.ravel()
          axis = 0
      if nan_policy == "propagate":
          return b.std(axis, ddof=ddof) / jnp.sqrt(
              b.shape[axis]
          ).astype(b.dtype)
      elif nan_policy == "omit":
          count = (~jnp.isnan(b)).sum(axis)
          return jnp.nanstd(b, axis, ddof=ddof) / jnp.sqrt(
              count
          ).astype(b.dtype)
      else:
          raise ValueError(f"{nan_policy} is not supported")
  
file_path: jax/jax/_src/scipy/stats/_core.py
imports: from __future__ import annotations
  from collections import namedtuple
  from functools import partial
  import math
  import jax
  import jax.numpy
  from jax import jit
  from jax._src import dtypes
  from jax._src.api import vmap
  from jax._src.numpy.util import check_arraylike, _wraps, promote_args_inexact
  from jax._src.typing import ArrayLike, Array
  from jax._src.util import canonicalize_axis
  import scipy
label_desc: Use image node_id 4 for calling a global function with example usage: sem(a, axis, ddof, nan_policy) and returns: unknown, unknown