code: def _apply_loss_reduction(loss: JaxArray, reduction: str) -> JaxArray:
      if reduction == "sum":
          return jnp.sum(loss)
      elif reduction == "mean":
          return jnp.mean(loss)
      else:  # reduction == "none"
          return loss
  
file_path: ivy/ivy/functional/backends/jax/experimental/losses.py
imports: import jax.numpy
  from typing import Optional
  from ivy.functional.backends.jax import JaxArray
  from ivy.func_wrapper import with_supported_device_and_dtypes
  from .None import backend_version
label_desc: Use image node_id 4 for calling a global function with example usage: _apply_loss_reduction(loss, reduction) and returns: jnp, jnp, loss