code: def _assert_transform(
      self, df, exp_data, model1, model2, check_target=True
  ):
      df.fit(model1)
      model2.fit(exp_data)
  
      result = df.transform(model1)
      expected = model2.transform(exp_data)
  
      self.assertIsInstance(result, pdml.ModelFrame)
  
      if df.has_target():
          # target is unchanged
          tm.assert_series_equal(df.target, result.target)
      else:
          self.assertIsNone(result.target)
  
      self.assert_numpy_array_almost_equal(result.data.values, expected)
      # index and columns are kept
      tm.assert_index_equal(result.index, df.index)
      tm.assert_index_equal(result.columns, df.columns)
  
imports: import pytest
  import numpy
  import pandas
  import sklearn.datasets
  import sklearn.preprocessing
  import pandas_ml
  import pandas_ml.util.testing
label_desc: Use image node_id 8 for calling the TestPreprocessing obj's underlying member method code with example usage: obj._assert_transform(df, exp_data, model1, model2, check_target) without return types