code: def test_check_X_converts_numpy_to_pandas():
      a1D = np.array([1, 2, 3, 4])
      a2D = np.array([[1, 2], [3, 4]])
      a3D = np.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])
  
      df_2D = pd.DataFrame(a2D, columns=["x0", "x1"])
      assert_frame_equal(df_2D, check_X(a2D))
  
      with pytest.raises(ValueError):
          check_X(a3D)
      with pytest.raises(ValueError):
          check_X(a1D)
  
imports: import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal, assert_series_equal
  from scipy.sparse import csr_matrix
  from feature_engine.dataframe_checks import _check_contains_inf, _check_contains_na, _check_X_matches_training_df, check_X, check_X_y, check_y
label_desc: Use image node_id 2 for calling a global function with example usage: test_check_X_converts_numpy_to_pandas() without return types