code: def test_lru_cache_df():
      df1 = pd.DataFrame(dict(a=[1, 2, 3], b=["a", "b", "c"]))
      df2 = pd.DataFrame(dict(a=[1, 2, 3], c=["a", "b", "c"]))
      df3 = pd.DataFrame(dict(a=[1, 2, 3], b=["a", "b", "d"]))
  
      @lru_cache_df(maxsize=2)
      def cached_func(df):
          pass
  
      assert (
          "CacheInfo(hits=0, misses=0, maxsize=2, currsize=0)"
          == str(cached_func.cache_info())
      )
      cached_func(df1)
      assert (
          "CacheInfo(hits=0, misses=1, maxsize=2, currsize=1)"
          == str(cached_func.cache_info())
      )
      cached_func(df1)
      assert (
          "CacheInfo(hits=1, misses=1, maxsize=2, currsize=1)"
          == str(cached_func.cache_info())
      )
      cached_func(df2)
      assert (
          "CacheInfo(hits=1, misses=2, maxsize=2, currsize=2)"
          == str(cached_func.cache_info())
      )
      cached_func(df2)
      assert (
          "CacheInfo(hits=2, misses=2, maxsize=2, currsize=2)"
          == str(cached_func.cache_info())
      )
      cached_func(df3)
      assert (
          "CacheInfo(hits=2, misses=3, maxsize=2, currsize=2)"
          == str(cached_func.cache_info())
      )
      cached_func(df1)
      assert (
          "CacheInfo(hits=2, misses=4, maxsize=2, currsize=2)"
          == str(cached_func.cache_info())
      )
      cached_func(df3)
      assert (
          "CacheInfo(hits=3, misses=4, maxsize=2, currsize=2)"
          == str(cached_func.cache_info())
      )
      cached_func.cache_clear()
      assert (
          "CacheInfo(hits=0, misses=0, maxsize=2, currsize=0)"
          == str(cached_func.cache_info())
      )
  
file_path: recommenders/tests/unit/recommenders/datasets/test_pandas_df_utils.py
imports: import os
  import numpy
  import pandas
  import pytest
  from tempfile import TemporaryDirectory
  from recommenders.datasets.pandas_df_utils import filter_by, LibffmConverter, has_same_base_dtype, has_columns, lru_cache_df, negative_feedback_sampler
label_desc: Use image node_id 7 for calling a global function with example usage: test_lru_cache_df() without return types