class_docstr: Shared methods across time-series forecasting transformers.
  
  Parameters
  ----------
  variables: str, int, or list of strings or integers, default=None.
      The variables to use to create the new features.
  
  {missing_values}
  
  {drop_original}
  
  Attributes
  ----------
  {feature_names_in_}
  
  {n_features_in_}
class_docstr_tok: ["Shared","methods","across","time-series","forecasting","transformers",".","Parameters","--","--","--","--","--","variables",":","str",",","int",",","or","list","of","strings","or","integers",",","default=None",".","The","variables","to","use","to","create","the","new","features",".","{","missing_values","}","{","drop_original","}","Attributes","--","--","--","--","--","{","feature_names_in_","}","{","n_features_in_","}"]
docstr: Checks that the dataframe does not contain NaN or Infinite values.
  
  Parameters
  ----------
  X: pandas dataframe of shape = [n_samples, n_features]
      The dataset for training or transformation.
docstr_tok: ["Checks","that","the","dataframe","does","not","contain","NaN","or","Infinite","values",".","Parameters","--","--","--","--","--","X",":","pandas","dataframe","of","shape","=","[","n_samples",",","n_features","]","The","dataset","for","training","or","transformation","."]
code: def _check_na_and_inf(self, X: pd.DataFrame):
      """
      Checks that the dataframe does not contain NaN or Infinite values.
  
      Parameters
      ----------
      X: pandas dataframe of shape = [n_samples, n_features]
          The dataset for training or transformation.
      """
      _check_contains_na(X, self.variables_)
      _check_contains_inf(X, self.variables_)
  
      return self
  
imports: from typing import List, Optional, Union
  import pandas
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils.validation import check_is_fitted
  from feature_engine._base_transformers.mixins import GetFeatureNamesOutMixin
  from feature_engine._docstrings.fit_attributes import _feature_names_in_docstring, _n_features_in_docstring
  from feature_engine._docstrings.init_parameters import _drop_original_docstring, _missing_values_docstring
  from feature_engine._docstrings.methods import _fit_not_learn_docstring
  from feature_engine._docstrings.substitute import Substitution
  from feature_engine._variable_handling.init_parameter_checks import _check_init_parameter_variables
  from feature_engine._variable_handling.variable_type_selection import _find_or_check_numerical_variables
  from feature_engine.dataframe_checks import _check_contains_inf, _check_contains_na, _check_X_matches_training_df, check_X
  from feature_engine.tags import _return_tags
label_desc: Use image node_id 3 for calling the BaseForecastTransformer obj's underlying member method code with example usage: obj._check_na_and_inf(X) and returns: self