code: def _check_nan(df, *columns):
      """
      Raise a ``ValueError`` if one of the columns does not exist or contains NaNs.
  
      :param df: the pandas DataFrame to test for NaNs
      :type df: pandas.DataFrame
      :param columns: a list of columns to test for NaNs. If left empty, all columns of the DataFrame will be tested.
      :type columns: str
  
      :return: None
      :rtype: None
      :raise: ``ValueError`` if ``NaNs`` are found in the DataFrame.
      """
  
      for col in columns:
          if col not in df.columns:
              raise ValueError("Column not found: {}".format(col))
  
          if df[col].isnull().any():
              raise ValueError(
                  "Column must not contain NaN values: {}".format(col)
              )
  
imports: import itertools
  from collections import defaultdict, namedtuple
  from typing import Iterable, Sized
  import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: _check_nan(df) without return types