code: def test_tensorflow_categorical_crossentropy(
      *,
      y_true,
      dtype_y_pred,
      from_logits,
      label_smoothing,
      frontend,
      test_flags,
      fn_tree,
      on_device,
      backend_fw,
  ):
      y_true = ivy.array(y_true, dtype=ivy.float32)
      dtype, y_pred = dtype_y_pred
  
      # Perform softmax on prediction if it's not a probability distribution.
      if not from_logits:
          y_pred = ivy.exp(y_pred) / ivy.sum(ivy.exp(y_pred))
  
      helpers.test_frontend_function(
          input_dtypes=[ivy.float32, dtype],
          backend_to_test=backend_fw,
          frontend=frontend,
          test_flags=test_flags,
          fn_tree=fn_tree,
          on_device=on_device,
          y_true=y_true,
          y_pred=y_pred,
          from_logits=from_logits,
          label_smoothing=label_smoothing,
      )
  
imports: import numpy
  from hypothesis import strategies
  import ivy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_frontend_test
label_desc: Use image node_id 7 for calling a global function with example usage: test_tensorflow_categorical_crossentropy() without return types