code: def test_feature_names_handle_filter():
      filtered, indices = FeatureNames(
          ["one", "two", "twenty-two"]
      ).handle_filter(lambda name: "two" in name, feature_re=None)
      assert indices == [1, 2]
      assert list(filtered) == ["two", "twenty-two"]
  
      filtered, indices = FeatureNames(
          ["one", "two", "twenty-two"]
      ).handle_filter(feature_filter=None, feature_re="two")
      assert indices == [1, 2]
      assert list(filtered) == ["two", "twenty-two"]
  
      filtered, indices = FeatureNames(["one", "two"]).handle_filter(
          None, None
      )
      assert indices is None
      assert list(filtered) == ["one", "two"]
  
      with pytest.raises(ValueError):
          FeatureNames(["one", "two"]).handle_filter(
              lambda name: True, ".*"
          )
  
file_path: eli5/tests/test_feature_names.py
imports: import pytest
  import numpy
  from eli5._feature_names import FeatureNames
label_desc: Use image node_id 2 for calling a global function with example usage: test_feature_names_handle_filter() without return types