class_docstr: Measure model average inference time (in seconds) per sample.
  
  Parameters
  ----------
  n_samples : int , default: 1_000
      number of samples to use for this check.
  random_state : int, default: 42
      random seed for all check internals.
docstr: Run check.
  
  Returns
  -------
  CheckResult
      value is of the type 'float' .
  
  Raises
  ------
  DeepchecksValueError
      If the test dataset is not a 'Dataset' instance with a label or
      if 'model' is not a scikit-learn-compatible fitted estimator instance.
code: def run_logic(self, context: Context, dataset_kind) -> CheckResult:
      """Run check.
  
      Returns
      -------
      CheckResult
          value is of the type 'float' .
  
      Raises
      ------
      DeepchecksValueError
          If the test dataset is not a 'Dataset' instance with a label or
          if 'model' is not a scikit-learn-compatible fitted estimator instance.
      """
      dataset = context.get_data_by_kind(dataset_kind)
      model = context.model
      df = dataset.features_columns
  
      prediction_method = model.predict  # type: ignore
  
      n_samples = (
          len(df) if len(df) < self.n_samples else self.n_samples
      )
      df = df.sample(n=n_samples, random_state=self.random_state)
  
      result = timeit.timeit(
          "predict(*args)",
          globals={"predict": prediction_method, "args": (df,)},
          number=1,
      )
  
      result = result / n_samples
  
      return CheckResult(
          value=result,
          display=(
              "Average model inference time for one sample (in seconds): "
              f"{format_number(result, floating_point=8)}"
          ),
      )
  
file_path: deepchecks/deepchecks/tabular/checks/model_evaluation/model_inference_time.py
imports: import timeit
  import typing
  from deepchecks.core import CheckResult, ConditionResult
  from deepchecks.core.condition import ConditionCategory
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.tabular import Context, SingleDatasetCheck
  from deepchecks.utils.strings import format_number
label_desc: Use image node_id 2 for calling the ModelInferenceTime obj's underlying member method code with example usage: obj.run_logic(context, dataset_kind) and returns: CheckResult