code: def kl_divergence(y_true, y_pred):
      # clip to range but avoid div-0
      y_true = ivy.clip(y_true, 1e-7, 1)
      y_pred = ivy.clip(y_pred, 1e-7, 1)
      return ivy.sum(y_true * ivy.log(y_true / y_pred), axis=-1).astype(
          y_true.dtype
      )
  
imports: import ivy
  from ivy.functional.frontends.tensorflow.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 12 for calling a global function with example usage: kl_divergence(y_true, y_pred) and returns: ivy