code: def test_column_keep(tmp_directory, add_current_to_sys_path):
      df = pd.DataFrame(
          {
              "index": [0, 1, 2],
              "x": [np.nan, 2, 3],
              "y": [10, 20, 30],
          }
      )
  
      Path("col_keep.py").write_text('def fn(df):\n    return ["y"]')
  
      selector = DataSelector(
          {
              "kind": "column_keep",
              "names": ["x"],
              "dotted_path": "col_keep.fn",
          }
      )
  
      out, _ = selector.transform(df, return_summary=True)
  
      assert set(out.columns) == {"x", "y"}
  
file_path: sklearn-evaluation/tests/test_DataSelector.py
imports: from pathlib import Path
  import pytest
  import numpy
  import pandas
  from sklearn_evaluation.training import DataSelector
  from sklearn_evaluation.training.selector import expand_arguments, _with_prefix
  from sklearn_evaluation.exceptions import DataSelectorError
label_desc: Use image node_id 6 for calling a global function with example usage: test_column_keep(tmp_directory, add_current_to_sys_path) without return types