class_docstr: Tests for LAX-backed scipy.stats implementations
code: def testDetrend(self, shape, dtype, axis, type, bp):
      rng = jtu.rand_default(self.rng())
      args_maker = lambda: [rng(shape, dtype)]
      kwds = dict(axis=axis, type=type, bp=bp)
  
      def osp_fun(x):
          return osp_signal.detrend(x, **kwds).astype(
              dtypes.to_inexact_dtype(x.dtype)
          )
  
      jsp_fun = partial(jsp_signal.detrend, **kwds)
  
      tol = {np.float32: 1e-5, np.float64: 1e-12}
  
      self._CheckAgainstNumpy(osp_fun, jsp_fun, args_maker, tol=tol)
      self._CompileAndCheck(jsp_fun, args_maker, rtol=tol, atol=tol)
  
imports: from functools import partial
  import unittest
  from absl.testing import absltest
  import numpy
  import scipy.signal
  from jax import lax
  import jax.numpy
  from jax._src import dtypes
  from jax._src import test_util
  import jax.scipy.signal
  from jax import config
label_desc: Use image node_id 4 for calling the LaxBackedScipySignalTests obj's underlying member method code with example usage: obj.testDetrend(shape, dtype, axis, type, bp) and returns: osp_signal