code: def test_filter_cache_regression_1():
      # See: https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1729
  
      cond = Condition(lambda: True)
  
      # The use of a `WeakValueDictionary` caused this following expression to
      # fail. The problem is that the nested `(a & a)` expression gets garbage
      # collected between the two statements and is removed from our cache.
      x = (cond & cond) & cond
      y = (cond & cond) & cond
      assert x == y
  
file_path: catboost/contrib/python/prompt-toolkit/py3/tests/test_filter.py
imports: from __future__ import annotations
  import pytest
  from prompt_toolkit.filters import Always, Condition, Filter, Never, to_filter
  from prompt_toolkit.filters.base import _AndList, _OrList
label_desc: Use image node_id 9 for calling a global function with example usage: test_filter_cache_regression_1() without return types