code: def sparse_categorical_crossentropy(
      target, output, from_logits=False, axis=-1
  ):
      target = jnp.array(target, dtype="int32")
      output = jnp.array(output)
      if (
          len(target.shape) == len(output.shape)
          and target.shape[-1] == 1
      ):
          target = jnp.squeeze(target, axis=-1)
  
      if len(output.shape) < 1:
          raise ValueError(
              "Argument `output` must be at least rank 1. "
              "Received: "
              f"output.shape={output.shape}"
          )
      if target.shape != output.shape[:-1]:
          raise ValueError(
              "Arguments `target` and `output` must have the same shape "
              "up until the last dimension: "
              f"target.shape={target.shape}, output.shape={output.shape}"
          )
      if from_logits:
          log_prob = jax.nn.log_softmax(output, axis=axis)
      else:
          output = output / jnp.sum(output, axis, keepdims=True)
          output = jnp.clip(output, epsilon(), 1.0 - epsilon())
          log_prob = jnp.log(output)
      target = jnn.one_hot(target, output.shape[axis], axis=axis)
      return -jnp.sum(target * log_prob, axis=axis)
  
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 29 for calling a global function with example usage: sparse_categorical_crossentropy(target, output, from_logits, axis) and returns: unknown