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