code: def kl_div(
      input,
      target,
      size_average=None,
      reduce=None,
      reduction="mean",
      log_target=False,
  ):
      orig_red = reduction
      if size_average is not None or reduce is not None:
          reduction = _get_reduction_string(size_average, reduce)
      else:
          reduction = reduction if reduction != "batchmean" else "sum"
      ret = ivy.kl_div(
          input, target, reduction=reduction, log_target=log_target
      )
      if orig_red == "batchmean" and input.ndim != 0:
          ret = ret / input.shape[0]
      return ret
  
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 14 for calling a global function with example usage: kl_div(input, target, size_average, reduce, reduction, log_target) and returns: ret