class_docstr: A class to convert sampler output arrays to their original types.
class_docstr_tok: ["A","class","to","convert","sampler","output","arrays","to","their","original","types","."]
code: def transform(self, X, y):
      X = self._transfrom_one(X, self.x_props)
      y = self._transfrom_one(y, self.y_props)
      if self.x_props["type"].lower() == "dataframe" and self.y_props[
          "type"
      ].lower() in {"series", "dataframe"}:
          # We lost the y.index during resampling. We can safely use X.index to align
          # them.
          y.index = X.index
      return X, y
  
imports: import warnings
  from collections import OrderedDict
  from functools import wraps
  from inspect import Parameter, signature
  from numbers import Integral, Real
  import numpy
  from sklearn.base import clone
  from sklearn.neighbors import NearestNeighbors
  from sklearn.utils import check_array, column_or_1d
  from sklearn.utils.multiclass import type_of_target
  from sklearn.utils.validation import _num_samples
  from .fixes import _is_pandas_df
label_desc: Use image node_id 2 for calling the ArraysTransformer obj's underlying member method code with example usage: obj.transform(X, y) and returns: X,  y