code: def test_discrete_ecdfer():
      fit_df = pd.DataFrame(
          {
              "prediction": [
                  0.1,
                  0.1,
                  0.3,
                  0.5,
                  0.5,
                  0.6,
                  0.6,
                  0.7,
                  0.8,
                  0.9,
              ]
          }
      )
  
      input_df = pd.DataFrame(
          {
              "prediction": [
                  0.1,
                  0.2,
                  0.3,
                  0.4,
                  0.5,
                  0.6,
                  0.65,
                  0.7,
                  0.8,
                  0.9,
                  1.0,
              ]
          }
      )
  
      ascending = True
      prediction_column = "prediction"
      ecdf_column = "prediction_ecdf"
      max_range = 1000
  
      ecdfer_fn, _, _ = ecdfer(
          fit_df, ascending, prediction_column, ecdf_column, max_range
      )
      ecdfer_df = ecdfer_fn(input_df)
  
      discrete_ecdfer_fn, _, _ = discrete_ecdfer(
          fit_df,
          ascending,
          prediction_column,
          ecdf_column,
          max_range,
          round_method=round,
      )
      discrete_ecdfer_df = discrete_ecdfer_fn(input_df)
  
      assert_almost_equal(
          ecdfer_df[ecdf_column].values,
          discrete_ecdfer_df[ecdf_column].values,
          decimal=5,
      )
  
      ascending = False
      ecdfer_fn, data, log = ecdfer(
          fit_df, ascending, prediction_column, ecdf_column, max_range
      )
      ecdfer_df = ecdfer_fn(input_df)
  
      discrete_ecdfer_fn, _, _ = discrete_ecdfer(
          fit_df,
          ascending,
          prediction_column,
          ecdf_column,
          max_range,
          round_method=float,
      )
      discrete_ecdfer_df = discrete_ecdfer_fn(input_df)
  
      assert_almost_equal(
          discrete_ecdfer_df[ecdf_column].values,
          ecdfer_df[ecdf_column].values,
          decimal=5,
      )
  
imports: from collections import OrderedDict
  import math
  import pandas
  import pytest
  from numpy import nan, round, sqrt, floor, log
  from numpy.testing import assert_almost_equal
  from pandas.testing import assert_frame_equal
  from fklearn.training.transformation import selector, capper, floorer, prediction_ranger, count_categorizer, label_categorizer, quantile_biner, truncate_categorical, rank_categorical, onehot_categorizer, target_categorizer, standard_scaler, ecdfer, discrete_ecdfer, custom_transformer, value_mapper, null_injector, missing_warner
label_desc: Use image node_id 17 for calling a global function with example usage: test_discrete_ecdfer() without return types