code: def cross_entropy(
      input,
      target,
      weight=None,
      size_average=None,
      ignore_index=-100,
      reduce=None,
      reduction="mean",
      label_smoothing=0.0,
  ):
      loss = ivy.cross_entropy(
          target, input, epsilon=label_smoothing, reduction="none"
      )
  
      if ignore_index != -100:
          mask = ivy.not_equal(target, ignore_index)
          loss = ivy.where(mask, loss, ivy.zeros_like(loss))
  
      if weight is not None:
          result = ivy.multiply(weight, loss)
  
      reduction = _get_reduction(reduction, size_average, reduce)
      return reduction(result).astype(target.dtype)
  
imports: import ivy
  import ivy.functional.frontends.torch
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
label_desc: Use image node_id 10 for calling a global function with example usage: cross_entropy(input, target, weight, size_average, ignore_index, reduce, reduction, label_smoothing) and returns: reduction