class_docstr: Parent class for checks that compare two datasets.
  
  The class checks train dataset and test dataset for model training and test.
class_docstr_tok: ["Parent","class","for","checks","that","compare","two","datasets",".","The","class","checks","train","dataset","and","test","dataset","for","model","training","and","test","."]
docstr: Run check.
  
  Parameters
  ----------
  train_dataset: Union[Dataset, pd.DataFrame]
      Dataset or DataFrame object, representing data an estimator was fitted on
  test_dataset: Union[Dataset, pd.DataFrame]
      Dataset or DataFrame object, representing data an estimator predicts on
  model: Optional[BasicModel], default: None
      A scikit-learn-compatible fitted estimator instance
  {additional_context_params:2*indent}
docstr_tok: ["Run","check",".","Parameters","--","--","--","--","--","train_dataset",":","Union","[","Dataset",",","pd.DataFrame","]","Dataset","or","DataFrame","object",",","representing","data","an","estimator","was","fitted","on","test_dataset",":","Union","[","Dataset",",","pd.DataFrame","]","Dataset","or","DataFrame","object",",","representing","data","an","estimator","predicts","on","model",":","Optional","[","BasicModel","]",",","default",":","None","A","scikit-learn-compatible","fitted","estimator","instance","{","additional_context_params:2","*","indent","}"]
code: def run(
      self,
      train_dataset: Union[Dataset, pd.DataFrame],
      test_dataset: Union[Dataset, pd.DataFrame],
      model: Optional[BasicModel] = None,
      feature_importance: Optional[pd.Series] = None,
      feature_importance_force_permutation: bool = False,
      feature_importance_timeout: int = 120,
      with_display: bool = True,
      y_pred_train: Optional[np.ndarray] = None,
      y_pred_test: Optional[np.ndarray] = None,
      y_proba_train: Optional[np.ndarray] = None,
      y_proba_test: Optional[np.ndarray] = None,
      model_classes: Optional[List] = None,
  ) -> CheckResult:
      """Run check.
  
      Parameters
      ----------
      train_dataset: Union[Dataset, pd.DataFrame]
          Dataset or DataFrame object, representing data an estimator was fitted on
      test_dataset: Union[Dataset, pd.DataFrame]
          Dataset or DataFrame object, representing data an estimator predicts on
      model: Optional[BasicModel], default: None
          A scikit-learn-compatible fitted estimator instance
      {additional_context_params:2*indent}
      """
      assert self.context_type is not None
      context = self.context_type(  # pylint: disable=not-callable
          train=train_dataset,
          test=test_dataset,
          model=model,
          feature_importance=feature_importance,
          feature_importance_force_permutation=feature_importance_force_permutation,
          feature_importance_timeout=feature_importance_timeout,
          y_pred_train=y_pred_train,
          y_pred_test=y_pred_test,
          y_proba_train=y_proba_train,
          y_proba_test=y_proba_test,
          with_display=with_display,
          model_classes=model_classes,
      )
      result = self.run_logic(context)
      context.finalize_check_result(result, self)
      return result
  
imports: import abc
  import warnings
  from typing import List, Mapping, Optional, Union
  import numpy
  import pandas
  from deepchecks.core.check_result import CheckFailure, CheckResult
  from deepchecks.core.checks import BaseCheck, DatasetKind, ModelOnlyBaseCheck, SingleDatasetBaseCheck, TrainTestBaseCheck
  from deepchecks.core.errors import DeepchecksNotSupportedError, DeepchecksValueError
  from deepchecks.tabular import deprecation_warnings
  from deepchecks.tabular._shared_docs import docstrings
  from deepchecks.tabular.context import Context
  from deepchecks.tabular.dataset import Dataset
  from deepchecks.tabular.model_base import ModelComparisonContext
  from deepchecks.utils.typing import BasicModel
label_desc: Use image node_id 1 for calling the TrainTestCheck obj's underlying member method code with example usage: obj.run(train_dataset, test_dataset, model, feature_importance, feature_importance_force_permutation, feature_importance_timeout, with_display, y_pred_train, y_pred_test, y_proba_train, y_proba_test, model_classes) and returns: result