class_docstr: SAR implementation for PySpark.
docstr: Get top K most frequently occurring items across all users.
  
  Args:
      top_k (int): number of top items to recommend.
      items (bool): if false, return most frequent users instead.
  
  Returns:
      pyspark.sql.DataFrame: Spark dataframe with top k most popular items
      and their frequencies in descending order.
docstr_tok: ["Get","top","K","most","frequently","occurring","items","across","all","users",".","Args",":","top_k","(","int",")",":","number","of","top","items","to","recommend",".","items","(","bool",")",":","if","false",",","return","most","frequent","users","instead",".","Returns",":","pyspark.sql.DataFrame",":","Spark","dataframe","with","top","k","most","popular","items","and","their","frequencies","in","descending","order","."]
code: def get_popularity_based_topk(self, top_k=10, items=True):
      """Get top K most frequently occurring items across all users.
  
      Args:
          top_k (int): number of top items to recommend.
          items (bool): if false, return most frequent users instead.
  
      Returns:
          pyspark.sql.DataFrame: Spark dataframe with top k most popular items
          and their frequencies in descending order.
      """
  
      # TODO: get most frequent users
      if not items:
          raise ValueError("Not implemented")
  
      return self.item_frequencies.orderBy(
          "frequency", ascending=False
      ).limit(top_k)
  
file_path: recommenders/contrib/sarplus/python/pysarplus/SARPlus.py
imports: import logging
  import pandas
  from pyspark.sql.types import StructType, StructField, IntegerType, FloatType
  from pyspark.sql.functions import pandas_udf, PandasUDFType
  from pysarplus import SARModel
  import pyspark.sql.functions
label_desc: Use image node_id 9 for calling the SARPlus obj's underlying member method code with example usage: obj.get_popularity_based_topk(top_k, items) and returns: self