code: def test_trimboth(self):
      a = np.arange(11)
      a2 = np.arange(24).reshape(6, 4)
      a3 = np.arange(24).reshape(6, 4, order="F")
      assert_equal(trimboth(a, 3 / 11.0), np.arange(3, 8))
      assert_equal(trimboth(a, 0.2), np.array([2, 3, 4, 5, 6, 7, 8]))
  
      assert_equal(trimboth(a2, 0.2), np.arange(4, 20).reshape(4, 4))
      assert_equal(
          trimboth(a3, 2 / 6.0),
          np.array([[2, 8, 14, 20], [3, 9, 15, 21]]),
      )
      assert_raises(
          ValueError, trimboth, np.arange(24).reshape(4, 6).T, 4 / 6.0
      )
  
imports: import numpy
  from numpy.testing import assert_equal, assert_allclose, assert_raises
  import pytest
  from statsmodels.stats.robust_compare import TrimmedMean, trim_mean, trimboth
  import statsmodels.stats.oneway
  from statsmodels.tools.testing import Holder
  from scipy.stats import trim1
label_desc: Use image node_id 2 for calling the Test_Trim obj's underlying member method code with example usage: obj.test_trimboth() without return types