code: def test_fht_agrees_with_fftlog():
      # check that fht numerically agrees with the output from Fortran FFTLog,
      # the results were generated with the provided `fftlogtest` program,
      # after fixing how the k array is generated (divide range by n-1, not n)
  
      # test function, analytical Hankel transform is of the same form
      def f(r, mu):
          return r ** (mu + 1) * np.exp(-(r**2) / 2)
  
      r = np.logspace(-4, 4, 16)
  
      dln = np.log(r[1] / r[0])
      mu = 0.3
      offset = 0.0
      bias = 0.0
  
      a = f(r, mu)
  
      # test 1: compute as given
      ours = fht(a, dln, mu, offset=offset, bias=bias)
      theirs = [
          -0.1159922613593045e-02,
          0.1625822618458832e-02,
          -0.1949518286432330e-02,
          0.3789220182554077e-02,
          0.5093959119952945e-03,
          0.2785387803618774e-01,
          0.9944952700848897e-01,
          0.4599202164586588,
          0.3157462160881342,
          -0.8201236844404755e-03,
          -0.7834031308271878e-03,
          0.3931444945110708e-03,
          -0.2697710625194777e-03,
          0.3568398050238820e-03,
          -0.5554454827797206e-03,
          0.8286331026468585e-03,
      ]
      assert_allclose(ours, theirs)
  
      # test 2: change to optimal offset
      offset = fhtoffset(dln, mu, bias=bias)
      ours = fht(a, dln, mu, offset=offset, bias=bias)
      theirs = [
          0.4353768523152057e-04,
          -0.9197045663594285e-05,
          0.3150140927838524e-03,
          0.9149121960963704e-03,
          0.5808089753959363e-02,
          0.2548065256377240e-01,
          0.1339477692089897,
          0.4821530509479356,
          0.2659899781579785,
          -0.1116475278448113e-01,
          0.1791441617592385e-02,
          -0.4181810476548056e-03,
          0.1314963536765343e-03,
          -0.5422057743066297e-04,
          0.3208681804170443e-04,
          -0.2696849476008234e-04,
      ]
      assert_allclose(ours, theirs)
  
      # test 3: positive bias
      bias = 0.8
      offset = fhtoffset(dln, mu, bias=bias)
      ours = fht(a, dln, mu, offset=offset, bias=bias)
      theirs = [
          -7.343667355831685,
          0.1710271207817100,
          0.1065374386206564,
          -0.5121739602708132e-01,
          0.2636649319269470e-01,
          0.1697209218849693e-01,
          0.1250215614723183,
          0.4739583261486729,
          0.2841149874912028,
          -0.8312764741645729e-02,
          0.1024233505508988e-02,
          -0.1644902767389120e-03,
          0.3305775476926270e-04,
          -0.7786993194882709e-05,
          0.1962258449520547e-05,
          -0.8977895734909250e-06,
      ]
      assert_allclose(ours, theirs)
  
      # test 4: negative bias
      bias = -0.8
      offset = fhtoffset(dln, mu, bias=bias)
      ours = fht(a, dln, mu, offset=offset, bias=bias)
      theirs = [
          0.8985777068568745e-05,
          0.4074898209936099e-04,
          0.2123969254700955e-03,
          0.1009558244834628e-02,
          0.5131386375222176e-02,
          0.2461678673516286e-01,
          0.1235812845384476,
          0.4719570096404403,
          0.2893487490631317,
          -0.1686570611318716e-01,
          0.2231398155172505e-01,
          -0.1480742256379873e-01,
          0.1692387813500801,
          0.3097490354365797,
          2.759360718240186,
          10.52510750700458,
      ]
      assert_allclose(ours, theirs)
  
file_path: catboost/contrib/python/scipy/py3/scipy/fft/tests/test_fftlog.py
imports: import numpy
  from numpy.testing import assert_allclose
  import pytest
  from scipy.fft._fftlog import fht, ifht, fhtoffset
  from scipy.special import poch
label_desc: Use image node_id 1 for calling a global function with example usage: test_fht_agrees_with_fftlog() and returns: unknown