code: def test_faster_sph_harm():
      sh_order = 8
      m, n = sph_harm_ind_list(sh_order)
      theta = np.array(
          [
              1.61491146,
              0.76661665,
              0.11976141,
              1.20198246,
              1.74066314,
              1.5925956,
              2.13022055,
              0.50332859,
              1.19868988,
              0.78440679,
              0.50686938,
              0.51739718,
              1.80342999,
              0.73778957,
              2.28559395,
              1.29569064,
              1.86877091,
              0.39239191,
              0.54043037,
              1.61263047,
              0.72695314,
              1.90527318,
              1.58186125,
              0.23130073,
              2.51695237,
              0.99835604,
              1.2883426,
              0.48114057,
              1.50079318,
              1.07978624,
              1.9798903,
              2.36616966,
              2.49233299,
              2.13116602,
              1.36801518,
              1.32932608,
              0.95926683,
              1.070349,
              0.76355762,
              2.07148422,
              1.50113501,
              1.49823314,
              0.89248164,
              0.22187079,
              1.53805373,
              1.9765295,
              1.13361568,
              1.04908355,
              1.68737368,
              1.91732452,
              1.01937457,
              1.45839,
              0.49641525,
              0.29087155,
              0.52824641,
              1.29875871,
              1.81023541,
              1.17030475,
              2.24953206,
              1.20280498,
              0.76399964,
              2.16109722,
              0.79780421,
              0.87154509,
          ]
      )
  
      phi = np.array(
          [
              -1.5889514,
              -3.11092733,
              -0.61328674,
              -2.4485381,
              2.88058822,
              2.02165946,
              -1.99783366,
              2.71235211,
              1.41577992,
              -2.29413676,
              -2.24565773,
              -1.55548635,
              2.59318232,
              -1.84672472,
              -2.33710739,
              2.12111948,
              1.87523722,
              -1.05206575,
              -2.85381987,
              -2.22808984,
              2.3202034,
              -2.19004474,
              -1.90358372,
              2.14818373,
              3.1030696,
              -2.86620183,
              -2.19860123,
              -0.45468447,
              -3.0034923,
              1.73345011,
              -2.51716288,
              2.49961525,
              -2.68782986,
              2.69699056,
              1.78566133,
              -1.59119705,
              -2.53378963,
              -2.02476738,
              1.36924987,
              2.17600517,
              2.38117241,
              2.99021511,
              -1.4218007,
              -2.44016802,
              -2.52868164,
              3.01531658,
              2.50093627,
              -1.70745826,
              -2.7863931,
              -2.97359741,
              2.17039906,
              2.68424643,
              1.77896086,
              0.45476215,
              0.99734418,
              -2.73107896,
              2.28815009,
              2.86276506,
              3.09450274,
              -3.09857384,
              -1.06955885,
              -2.83826831,
              1.81932195,
              2.81296654,
          ]
      )
  
      sh = spherical_harmonics(m, n, theta[:, None], phi[:, None])
      sh2 = sph_harm_sp(m, n, theta[:, None], phi[:, None])
  
      assert_array_almost_equal(sh, sh2, 8)
      sh = spherical_harmonics(
          m, n, theta[:, None], phi[:, None], use_scipy=False
      )
      assert_array_almost_equal(sh, sh2, 8)
  
imports: import warnings
  import numpy
  import numpy.linalg
  import numpy.testing
  from dipy.testing import assert_true
  from numpy.testing import assert_array_equal, assert_array_almost_equal, assert_equal, assert_raises
  from scipy.special import sph_harm
  from dipy.core.sphere import hemi_icosahedron, Sphere
  from dipy.core.gradients import gradient_table
  from dipy.core.interpolation import NearestNeighborInterpolator
  from dipy.sims.voxel import single_tensor
  from dipy.direction.peaks import peak_directions
  from dipy.reconst.shm import sf_to_sh, sh_to_sf
  from dipy.sims.voxel import multi_tensor_odf
  from dipy.data import mrtrix_spherical_functions
  from dipy.reconst import odf
  from dipy.reconst.shm import real_sh_descoteaux_from_index, real_sym_sh_basis, real_sym_sh_mrtrix, real_sh_descoteaux, real_sh_tournier, sph_harm_ind_list, order_from_ncoef, OpdtModel, normalize_data, hat, lcr_matrix, smooth_pinv, bootstrap_data_array, bootstrap_data_voxel, ResidualBootstrapWrapper, CsaOdfModel, QballModel, SphHarmFit, spherical_harmonics, anisotropic_power, calculate_max_order, sh_to_sf_matrix, gen_dirac, convert_sh_to_full_basis, convert_sh_from_legacy, convert_sh_to_legacy, convert_sh_descoteaux_tournier, descoteaux07_legacy_msg, tournier07_legacy_msg
label_desc: Use image node_id 19 for calling a global function with example usage: test_faster_sph_harm() without return types