code: def test_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,
              ]
          }
      )
  
      expected_df = pd.DataFrame(
          {
              "prediction_ecdf": [
                  200.0,
                  200.0,
                  300.0,
                  300.0,
                  500.0,
                  700.0,
                  700.0,
                  800.0,
                  900.0,
                  1000.0,
                  1000.0,
              ]
          }
      )
  
      ascending = True
      prediction_column = "prediction"
      ecdf_column = "prediction_ecdf"
      max_range = 1000
  
      pred_fn, data, log = ecdfer(
          fit_df, ascending, prediction_column, ecdf_column, max_range
      )
      actual_df = pred_fn(input_df)
  
      assert_almost_equal(
          expected_df[ecdf_column].values,
          actual_df[ecdf_column].values,
          decimal=5,
      )
  
      ascending = False
      pred_fn, data, log = ecdfer(
          fit_df, ascending, prediction_column, ecdf_column, max_range
      )
  
      expected_df = pd.DataFrame(
          {
              "prediction_ecdf": [
                  800.0,
                  800.0,
                  700.0,
                  700.0,
                  500.0,
                  300.0,
                  300.0,
                  200.0,
                  100.0,
                  0.0,
                  0.0,
              ]
          }
      )
      actual_df = pred_fn(input_df)
      assert_almost_equal(
          expected_df[ecdf_column].values,
          actual_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 16 for calling a global function with example usage: test_ecdfer() without return types