code: def test_imbalance_dont_change_data_after_fit(self):
      a = AutoML(
          results_path=self.automl_dir,
          total_time_limit=5,
          train_ensemble=False,
          validation_strategy={
              "validation_type": "kfold",
              "k_folds": 10,
              "shuffle": True,
              "stratify": True,
          },
          start_random_models=1,
          explain_level=0,
      )
  
      rows = 100
      X = pd.DataFrame(
          {
              "f1": np.random.rand(rows),
              "f2": np.random.rand(rows),
              "f3": np.random.rand(rows),
          }
      )
      y = np.ones(rows)
  
      y[:8] = 0
      y[10:12] = 2
      sample_weight = np.ones(rows)
  
      a.fit(X, y, sample_weight=sample_weight)
  
      # original data **without** inserted samples to handle imbalance
      self.assertEqual(X.shape[0], rows)
      self.assertEqual(y.shape[0], rows)
      self.assertEqual(sample_weight.shape[0], rows)
  
file_path: mljar-supervised/tests/tests_automl/test_handle_imbalance.py
imports: import os
  import unittest
  import tempfile
  import json
  import numpy
  import pandas
  import shutil
  from sklearn import datasets
  from supervised import AutoML
  from supervised.algorithms.registry import MULTICLASS_CLASSIFICATION
  from supervised.algorithms.random_forest import additional
  from supervised.algorithms.xgboost import additional
label_desc: Use image node_id 4 for calling the AutoMLHandleImbalanceTest obj's underlying member method code with example usage: obj.test_imbalance_dont_change_data_after_fit() without return types