code: def test_detect_variables_with_na(df_na):
      # test case 1: automatically detect variables with missing data
      imputer = DropMissingData(missing_only=True, variables=None)
      X_transformed = imputer.fit_transform(df_na)
      # init params
      assert imputer.missing_only is True
      assert imputer.threshold is None
      assert imputer.variables is None
      # fit params
      assert imputer.variables_ == [
          "Name",
          "City",
          "Studies",
          "Age",
          "Marks",
      ]
      assert imputer.n_features_in_ == 6
      # transform outputs
      assert X_transformed.shape == (5, 6)
      assert X_transformed["Name"].shape[0] == 5
      assert X_transformed.isna().sum().sum() == 0
  
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 1 for calling a global function with example usage: test_detect_variables_with_na(df_na) without return types