code: def __check_if_pandas_series(x, y):
      """
      Helper function to check if both x and y are pandas.Series. If not, raises a ``TypeError``.
  
      :param x: the first object to check.
      :type x: Any
  
      :param y: the second object to check.
      :type y: Any
  
      :return: None
      :rtype: None
  
      :raise: ``TypeError`` if one of the objects is not a pandas.Series.
      """
      if not isinstance(x, pd.Series):
          raise TypeError("x should be a pandas Series")
      if not isinstance(y, pd.Series):
          raise TypeError("y should be a pandas Series")
      if not y.index.equals(x.index):
          raise ValueError("X and y need to have the same index!")
  
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 5 for calling a global function with example usage: __check_if_pandas_series(x, y) without return types