code: def test_timebinner3():
      """Test TimeBinner."""
      X, y = load_basic_motions(return_X_y=True)
  
      def aggfunc(series):
          return np.quantile(series, q=0.25)
  
      freq = 5
      idx = pd.interval_range(
          start=0, end=100, freq=freq, closed="right"
      )
      tb = TimeBinner(idx=idx, aggfunc=aggfunc)
      row = 1
      col = 3
      tb.fit(X)
      Xtb = tb.transform(X)
      assert np.isclose(
          np.quantile(
              X.iloc[row, 0][col * freq + 1 : ((col + 1) * freq) + 1],
              q=0.25,
          ),
          Xtb.iloc[row, col],
      )
  
file_path: sktime/sktime/transformations/panel/tests/test_timebinner.py
imports: import numpy
  import pandas
  import pytest
  from sktime.datasets import load_basic_motions
  from sktime.tests.test_switch import run_test_for_class
  from sktime.transformations.panel.reduce import TimeBinner
label_desc: Use image node_id 3 for calling a global function with example usage: test_timebinner3() and returns: np