code: def is_spark(df):
      """Utility to check if a dataframe is a spark dataframe.
  
      :param df: The dataframe to check.
      :type df: pyspark.sql.dataframe.DataFrame or pandas.DataFrame
      :return: True if the dataframe is a spark dataframe, False otherwise.
      :rtype: bool
      """
      try:
          return spark_available and isinstance(df, ps.frame.DataFrame)
      except Exception:
          return False
  
label_desc: Use image node_id 2 for calling a global function with example usage: is_spark(df) and returns: unknown, False