code: def test_close_approximations_do_not_go_deep(op, query_count, mocker):
      """Test that the recursive solver is only used when necessary."""
      basis_set = ("H", "T", "T*")
      basis_length = 10
      _ = _approximate_set(
          basis_set, max_length=basis_length
      )  # pre-compute so spy is accurate
  
      spy = mocker.spy(sp.spatial.KDTree, "query")
      _ = sk_decomposition(
          op,
          1e-4,
          max_depth=3,
          basis_set=basis_set,
          basis_length=basis_length,
      )
      assert spy.call_count == query_count
  
file_path: pennylane/tests/ops/op_math/test_solovay_kitaev.py
imports: import math
  import pytest
  import scipy
  import pennylane
  from pennylane.ops.op_math.decompositions.solovay_kitaev import _SU2_transform, _quaternion_transform, _contains_SU2, _approximate_set, _group_commutator_decompose, sk_decomposition
label_desc: Use image node_id 8 for calling a global function with example usage: test_close_approximations_do_not_go_deep(op, query_count, mocker) without return types