code: def test_sklearn_tree_predict(X, y, max_depth):
      try:
          from sklearn.tree import DecisionTreeClassifier as sklearn_DTC
      except ImportError:
          print(
              "sklearn not installed, skipping test_sklearn_tree_predict"
          )
          return
      sklearn_pred = _get_sklearn_predict(X, y, max_depth, sklearn_DTC)(
          X
      )
      ivy_pred = _get_sklearn_predict(
          ivy.array(X), ivy.array(y), max_depth, ivy_DTC
      )(X)
      helpers.assert_same_type_and_shape([sklearn_pred, ivy_pred])
  
imports: from ivy.functional.frontends.sklearn.tree import DecisionTreeClassifier
  import ivy
  from hypothesis import given
  import ivy_tests.test_ivy.helpers
label_desc: Use image node_id 2 for calling a global function with example usage: test_sklearn_tree_predict(X, y, max_depth) without return types