code: def test_from_nested_to_2d_array(
      n_instances, n_columns, n_timepoints
  ):
      """Test from_nested_to_2d_array for correctness."""
      nested, _ = make_classification_problem(
          n_instances, n_columns, n_timepoints
      )
  
      array = from_nested_to_2d_array(nested)
      assert array.shape == (n_instances, n_columns * n_timepoints)
      assert array.index.equals(nested.index)
  
imports: import numpy
  import pandas
  import pytest
  from sktime.datasets import generate_example_long_table, make_multi_index_dataframe
  from sktime.datatypes._adapter import convert_from_multiindex_to_listdataset
  from sktime.datatypes._panel._check import are_columns_nested, is_nested_dataframe
  from sktime.datatypes._panel._convert import from_2d_array_to_nested, from_3d_numpy_to_2d_array, from_3d_numpy_to_multi_index, from_3d_numpy_to_nested, from_long_to_nested, from_multi_index_to_3d_numpy, from_multi_index_to_nested, from_nested_to_2d_array, from_nested_to_3d_numpy, from_nested_to_long, from_nested_to_multi_index
  from sktime.utils._testing.panel import make_classification_problem
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 4 for calling a global function with example usage: test_from_nested_to_2d_array(n_instances, n_columns, n_timepoints) without return types