code: def test_threshold(df_na):
      # Each row must have 100% data available
      imputer = DropMissingData(threshold=1)
      X = imputer.fit_transform(df_na)
      assert list(X.index) == [0, 1, 4, 6, 7]
  
      # Each row must have at least 1% data available
      imputer = DropMissingData(threshold=0.01)
      X = imputer.fit_transform(df_na)
      assert list(X.index) == [0, 1, 2, 3, 4, 5, 6, 7]
  
      # Each row must have at least 50% data available
      imputer = DropMissingData(threshold=0.50)
      X = imputer.fit_transform(df_na)
      assert list(X.index) == [0, 1, 2, 4, 5, 6, 7]
  
      # Each row must have 100% data available
      imputer = DropMissingData(threshold=1, missing_only=False)
      X = imputer.fit_transform(df_na)
      assert list(X.index) == [0, 1, 4, 6, 7]
  
      # Each row must have at least 1% data available
      imputer = DropMissingData(threshold=0.01, missing_only=False)
      X = imputer.fit_transform(df_na)
      assert list(X.index) == [0, 1, 2, 3, 4, 5, 6, 7]
  
      # Each row must have at least 50% data available
      imputer = DropMissingData(threshold=0.50, missing_only=False)
      X = imputer.fit_transform(df_na)
      assert list(X.index) == [0, 1, 2, 4, 5, 6, 7]
  
file_path: feature_engine/tests/test_imputation/test_drop_missing_data.py
imports: import pytest
  from feature_engine.imputation import DropMissingData
label_desc: Use image node_id 6 for calling a global function with example usage: test_threshold(df_na) without return types