code: def check_all_nan(df, cols=None):
      """
      Checker function to test whether all data within a column of a dataframe is :attr:`numpy:numpy.nan`
  
      :param df: dataframe whose data needs to be checked
      :type df: :class:`pandas:pandas.DataFrame`
      :param cols: columns to test
      :type cols: list of str
      :raises Exception: if all data within a column is :attr:`numpy:numpy.nan`
      """
      for col in cols or df.columns:
          if df[col].isnull().all():
              raise Exception(
                  'All data for column "{}" is NaN!'.format(col)
              )
  
imports: import copy
  import numpy
  import pandas
  import dtale.global_state
  import dtale.pandas_util
  from dtale.column_analysis import handle_cleaners
  from dtale.constants import CHART_JOINER_CHAR
  from dtale.query import build_col_key, run_query
  from dtale.utils import ChartBuildingError, build_formatters, classify_type, find_dtype, find_dtype_formatter, flatten_lists, get_dtypes, json_int, make_list, triple_quote
label_desc: Use image node_id 9 for calling a global function with example usage: check_all_nan(df, cols) without return types