code: def test_automatically_find_variables_and_return_as_numeric(
      df_normal_dist,
  ):
      # test case 1: automatically select variables, return_object=False
      transformer = EqualWidthDiscretiser(
          bins=10, variables=None, return_object=False
      )
      X = transformer.fit_transform(df_normal_dist)
  
      # fit parameters
      _, bins = pd.cut(
          x=df_normal_dist["var"],
          bins=10,
          retbins=True,
          duplicates="drop",
      )
      bins[0] = float("-inf")
      bins[len(bins) - 1] = float("inf")
  
      # transform output
      X_t = [x for x in range(0, 10)]
      val_counts = [18, 17, 16, 13, 11, 7, 7, 5, 5, 1]
  
      # init params
      assert transformer.bins == 10
      assert transformer.variables is None
      assert transformer.return_object is False
      # fit params
      assert transformer.variables_ == ["var"]
      assert transformer.n_features_in_ == 1
      # transform params
      assert (transformer.binner_dict_["var"] == bins).all()
      assert all(x for x in X["var"].unique() if x not in X_t)
      # in equal width discretisation, intervals get different number of values
      assert all(
          x for x in X["var"].value_counts() if x not in val_counts
      )
  
file_path: feature_engine/tests/test_discretisation/test_equal_width_discretiser.py
imports: import pandas
  import pytest
  from sklearn.exceptions import NotFittedError
  from feature_engine.discretisation import EqualWidthDiscretiser
label_desc: Use image node_id 1 for calling a global function with example usage: test_automatically_find_variables_and_return_as_numeric(df_normal_dist) without return types