code: def test_arrays_transformer_pandas():
      pd = pytest.importorskip("pandas")
  
      X = np.array([[0, 0], [1, 1]])
      y = np.array([0, 1])
  
      X_df = pd.DataFrame(X, columns=["a", "b"])
      X_df = X_df.astype(int)
      y_df = pd.DataFrame(y, columns=["target"])
      y_df = y_df.astype(int)
      y_s = pd.Series(y, name="target", dtype=int)
  
      # DataFrame and DataFrame case
      arrays_transformer = ArraysTransformer(X_df, y_df)
      X_res, y_res = arrays_transformer.transform(X, y)
      assert isinstance(X_res, pd.DataFrame)
      assert_array_equal(X_res.columns, X_df.columns)
      assert_array_equal(X_res.dtypes, X_df.dtypes)
      assert isinstance(y_res, pd.DataFrame)
      assert_array_equal(y_res.columns, y_df.columns)
      assert_array_equal(y_res.dtypes, y_df.dtypes)
  
      # DataFrames and Series case
      arrays_transformer = ArraysTransformer(X_df, y_s)
      _, y_res = arrays_transformer.transform(X, y)
      assert isinstance(y_res, pd.Series)
      assert_array_equal(y_res.name, y_s.name)
      assert_array_equal(y_res.dtype, y_s.dtype)
  
imports: from collections import Counter, OrderedDict
  import numpy
  import pytest
  from sklearn.cluster import KMeans
  from sklearn.neighbors import NearestNeighbors
  from sklearn.neighbors._base import KNeighborsMixin
  from sklearn.utils._testing import assert_array_equal
  from imblearn.utils import check_neighbors_object, check_sampling_strategy, check_target_type
  from imblearn.utils._validation import ArraysTransformer, _deprecate_positional_args, _is_neighbors_object
  from imblearn.utils.testing import _CustomNearestNeighbors
label_desc: Use image node_id 19 for calling a global function with example usage: test_arrays_transformer_pandas() without return types