class_docstr: Parent class for checks that only use one dataset.
class_docstr_tok: ["Parent","class","for","checks","that","only","use","one","dataset","."]
docstr: Run check.
  
  Parameters
  ----------
  dataset: VisionData
      VisionData object to process
  {additional_run_params:2*indent}
docstr_tok: ["Run","check",".","Parameters","--","--","--","--","--","dataset",":","VisionData","VisionData","object","to","process","{","additional_run_params:2","*","indent","}"]
code: def run(
      self,
      dataset: VisionData,
      random_state: int = 42,
      with_display: bool = True,
  ) -> CheckResult:
      """Run check.
  
      Parameters
      ----------
      dataset: VisionData
          VisionData object to process
      {additional_run_params:2*indent}
      """
      with ProgressBarGroup() as progressbar_factory:
          context: Context = self.context_type(
              train=dataset,
              random_state=random_state,
              with_display=with_display,
          )
          self.initialize_run(context, DatasetKind.TRAIN)
  
          with progressbar_factory.create_dummy(
              name="Processing Batches"
          ):
              for batch in context.train:
                  batch = BatchWrapper(
                      batch,
                      context.train.task_type,
                      context.train.number_of_images_cached,
                  )
                  context.train.update_cache(
                      len(batch),
                      batch.numpy_labels,
                      batch.numpy_predictions,
                  )
                  self.update(context, batch, DatasetKind.TRAIN)
                  if (
                      self.n_samples is not None
                      and context.train.number_of_images_cached
                      >= self.n_samples
                  ):
                      break
  
          with progressbar_factory.create_dummy(
              name="Computing Check", unit="Check"
          ):
              result = self.compute(context, DatasetKind.TRAIN)
              context.finalize_check_result(
                  result, self, DatasetKind.TRAIN
              )
      return result
  
imports: from typing import Any
  from deepchecks.core.check_result import CheckResult
  from deepchecks.core.checks import DatasetKind, ModelOnlyBaseCheck, SingleDatasetBaseCheck, TrainTestBaseCheck
  from deepchecks.utils.ipython import ProgressBarGroup
  from deepchecks.vision import deprecation_warnings
  from deepchecks.vision._shared_docs import docstrings
  from deepchecks.vision.context import Context
  from deepchecks.vision.vision_data import VisionData
  from deepchecks.vision.vision_data.batch_wrapper import BatchWrapper
label_desc: Use image node_id 1 for calling the SingleDatasetCheck obj's underlying member method code with example usage: obj.run(dataset, random_state, with_display) and returns: result