code: def test_min_rating_filter(spark_dataset):
      dfs_user = min_rating_filter_spark(
          spark_dataset, min_rating=5, filter_by="user"
      )
      dfs_item = min_rating_filter_spark(
          spark_dataset, min_rating=5, filter_by="item"
      )
  
      user_rating_counts = [
          x["count"] >= 5
          for x in dfs_user.groupBy(DEFAULT_USER_COL).count().collect()
      ]
      item_rating_counts = [
          x["count"] >= 5
          for x in dfs_item.groupBy(DEFAULT_ITEM_COL).count().collect()
      ]
  
      assert all(user_rating_counts)
      assert all(item_rating_counts)
  
file_path: recommenders/tests/unit/recommenders/datasets/test_spark_splitter.py
imports: import pytest
  import numpy
  import pandas
  from recommenders.utils.constants import DEFAULT_USER_COL, DEFAULT_ITEM_COL, DEFAULT_RATING_COL, DEFAULT_TIMESTAMP_COL
label_desc: Use image node_id 3 for calling a global function with example usage: test_min_rating_filter(spark_dataset) without return types