code: def test_to_cli_filter():
      f1 = to_cli_filter(True)
      f2 = to_cli_filter(False)
      f3 = to_cli_filter(Condition(lambda cli: True))
      f4 = to_cli_filter(Condition(lambda cli: False))
  
      assert isinstance(f1, CLIFilter)
      assert isinstance(f2, CLIFilter)
      assert isinstance(f3, CLIFilter)
      assert isinstance(f4, CLIFilter)
      assert f1(None)
      assert not f2(None)
      assert f3(None)
      assert not f4(None)
  
      with pytest.raises(TypeError):
          to_cli_filter(4)
      with pytest.raises(TypeError):
          to_cli_filter(Condition(lambda: True))
  
file_path: catboost/contrib/python/prompt-toolkit/py2/tests/test_filter.py
imports: from __future__ import unicode_literals
  from prompt_toolkit.filters import Condition, Never, Always, Filter
  from prompt_toolkit.filters.types import CLIFilter, SimpleFilter
  from prompt_toolkit.filters.utils import to_cli_filter, to_simple_filter
  from prompt_toolkit.filters.cli import HasArg, HasFocus, HasSelection
  import pytest
label_desc: Use image node_id 11 for calling a global function with example usage: test_to_cli_filter() without return types