code: def test_truncation_transformer():
      """Test truncation to the shortest series length."""
      # load data
      X_train, y_train = load_basic_motions(
          split="train", return_X_y=True
      )
  
      truncated_transformer = TruncationTransformer(5)
      Xt = truncated_transformer.fit_transform(X_train)
  
      # when we tabularize the data it has 6 dimensions
      # and we've truncated them all to 5 long.
      data = from_nested_to_2d_array(Xt)
      assert len(data.columns) == 5 * 6
  
imports: from sktime.datasets import load_basic_motions
  from sktime.datatypes import get_examples
  from sktime.datatypes._panel._convert import from_nested_to_2d_array
  from sktime.transformations.panel.truncation import TruncationTransformer
label_desc: Use image node_id 1 for calling a global function with example usage: test_truncation_transformer() without return types