code: def test_null_injector():
      train = pd.DataFrame(
          {
              "a": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0],
              "b": [1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0],
              "c": [9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0],
              "d": [1.0, 8.0, 1.0, 4.0, 3.0, 4.0, 3.0],
          }
      )
  
      test = pd.DataFrame(
          {
              "a": [5.0, 6.0, 7.0],
              "b": [1.0, 0.0, 0.0],
              "c": [8.0, 9.0, 9.0],
              "d": [1.0, 1.0, 1.0],
          }
      )
  
      p, result, log = null_injector(train, 0.3, ["a", "b"], seed=42)
  
      expected = pd.DataFrame(
          {
              "a": [1.0, nan, nan, 4.0, 5.0, 6.0, 7.0],
              "b": [1.0, 0.0, 0.0, 1.0, 1.0, nan, 1.0],
              "c": [9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0],
              "d": [1.0, 8.0, 1.0, 4.0, 3.0, 4.0, 3.0],
          }
      )
  
      assert expected.equals(result)
  
      assert p(test).equals(test), "test must be left unchanged"
  
      # test group nans
      p, result, log = null_injector(
          train, 0.3, groups=[["a"], ["b", "c"]], seed=42
      )
  
      expected = pd.DataFrame(
          {
              "a": [1.0, nan, nan, 4.0, 5.0, 6.0, 7.0],
              "b": [1.0, 0.0, 0.0, 1.0, 1.0, nan, 1.0],
              "c": [9.0, 8.0, 7.0, 6.0, 5.0, nan, 3.0],
              "d": [1.0, 8.0, 1.0, 4.0, 3.0, 4.0, 3.0],
          }
      )
  
      assert expected.equals(result)
  
      assert p(test).equals(test), "test must be left unchanged"
  
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 15 for calling a global function with example usage: test_null_injector() without return types