code: def test_filter_by():
      user_df = pd.DataFrame(
          {"user_id": [1, 9, 3, 5, 5, 1], "item_id": [1, 6, 7, 6, 8, 9]}
      )
  
      seen_df = pd.DataFrame(
          {
              "user_id": [1, 2, 4],
          }
      )
  
      filtered_df = filter_by(user_df, seen_df, ["user_id"])
  
      # Check filtered out number
      assert len(filtered_df) == len(user_df) - 2
      # Check filtered out record
      assert len(filtered_df.loc[(user_df["user_id"] == 1)]) == 0
  
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 3 for calling a global function with example usage: test_filter_by() without return types