code: def fillna_check(df, method, check=True):
      if method:
          out = getattr(df, method)()
      else:
          out = df.fillna()
      if check and out.isnull().values.all(axis=0).any():
          raise ValueError(
              "All NaN partition encountered in `fillna`. Try "
              "using ``df.repartition`` to increase the partition "
              "size, or specify `limit` in `fillna`."
          )
      return out
  
imports: from __future__ import annotations
  import warnings
  from functools import partial
  import numpy
  import pandas
  from pandas.api.types import is_extension_array_dtype
  from pandas.errors import PerformanceWarning
  from tlz import partition
  from dask.dataframe._compat import PANDAS_GE_131, PANDAS_GE_140, PANDAS_GE_200, check_apply_dataframe_deprecation, check_applymap_dataframe_deprecation, check_convert_dtype_deprecation, check_observed_deprecation
  from dask.dataframe.dispatch import concat, concat_dispatch, group_split_dispatch, hash_object_dispatch, is_categorical_dtype, is_categorical_dtype_dispatch, tolist, tolist_dispatch, union_categoricals
  from dask.dataframe.utils import is_dataframe_like, is_index_like, is_series_like
label_desc: Use image node_id 30 for calling a global function with example usage: fillna_check(df, method, check) and returns: out