code: def _check_for_nans(x, y):
      """
      Helper function to check if target or feature contains NaNs.
      :param x: A feature
      :type x: pandas.Series
      :param y: The target
      :type y: pandas.Series
      :raises: `ValueError` if target or feature contains NaNs.
      """
      if np.isnan(x.values).any():
          raise ValueError(
              "Feature {} contains NaN values".format(x.name)
          )
      elif np.isnan(y.values).any():
          raise ValueError("Target contains NaN values")
  
file_path: tsfresh/tsfresh/feature_selection/significance_tests.py
imports: import warnings
  from builtins import str
  import numpy
  import pandas
  from scipy import stats
label_desc: Use image node_id 8 for calling a global function with example usage: _check_for_nans(x, y) without return types