code: def test_remove_highly_null_features():
      nulls_df = pd.DataFrame(
          {
              "id": [0, 1, 2, 3],
              "half_nulls": [None, None, 88, 99],
              "all_nulls": [None, None, None, None],
              "quarter": ["a", "b", None, "c"],
              "vals": [True, True, False, False],
          },
      )
  
      es = EntitySet("data", {"nulls": (nulls_df, "id")})
      es["nulls"].ww.set_types(
          logical_types={
              "all_nulls": "categorical",
              "quarter": "categorical",
          },
      )
      fm, features = dfs(
          entityset=es,
          target_dataframe_name="nulls",
          trans_primitives=["is_null"],
          max_depth=1,
      )
  
      with pytest.raises(
          ValueError,
          match="pct_null_threshold must be a float between 0 and 1, inclusive.",
      ):
          remove_highly_null_features(fm, pct_null_threshold=1.1)
  
      with pytest.raises(
          ValueError,
          match="pct_null_threshold must be a float between 0 and 1, inclusive.",
      ):
          remove_highly_null_features(fm, pct_null_threshold=-0.1)
  
      no_thresh = remove_highly_null_features(fm)
      no_thresh_cols = set(no_thresh.columns)
      diff = set(fm.columns) - no_thresh_cols
      assert len(diff) == 1
      assert "all_nulls" not in no_thresh_cols
  
      half = remove_highly_null_features(fm, pct_null_threshold=0.5)
      half_cols = set(half.columns)
      diff = set(fm.columns) - half_cols
      assert len(diff) == 2
      assert "all_nulls" not in half_cols
      assert "half_nulls" not in half_cols
  
      no_tolerance = remove_highly_null_features(
          fm, pct_null_threshold=0
      )
      no_tolerance_cols = set(no_tolerance.columns)
      diff = set(fm.columns) - no_tolerance_cols
      assert len(diff) == 3
      assert "all_nulls" not in no_tolerance_cols
      assert "half_nulls" not in no_tolerance_cols
      assert "quarter" not in no_tolerance_cols
  
      (
          with_features_param,
          with_features_param_features,
      ) = remove_highly_null_features(fm, features)
      assert len(with_features_param_features) == len(no_thresh.columns)
      for i in range(len(with_features_param_features)):
          assert (
              with_features_param_features[i].get_name()
              == no_thresh.columns[i]
          )
          assert with_features_param.columns[i] == no_thresh.columns[i]
  
file_path: featuretools/featuretools/tests/selection/test_selection.py
imports: import numpy
  import pandas
  import pytest
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Boolean, BooleanNullable, NaturalLanguage
  from featuretools import EntitySet, Feature, dfs
  from featuretools.selection import remove_highly_correlated_features, remove_highly_null_features, remove_low_information_features, remove_single_value_features
  from featuretools.tests.testing_utils import make_ecommerce_entityset
label_desc: Use image node_id 5 for calling a global function with example usage: test_remove_highly_null_features() without return types