class_docstr: Contains all the data + properties the user has passed to a check/suite, and validates it seamlessly.
  
  Parameters
  ----------
  train : Optional[VisionData] , default: None
      VisionData object, representing data the model was fitted on
  test : Optional[VisionData] , default: None
      VisionData object, representing data the models predicts on
  {additional_run_params:indent}
docstr: Run final processing on a check result which includes validation and conditions processing.
docstr_tok: ["Run","final","processing","on","a","check","result","which","includes","validation","and","conditions","processing","."]
code: def finalize_check_result(
      self, check_result, check, dataset_kind: DatasetKind = None
  ):
      """Run final processing on a check result which includes validation and conditions processing."""
      # Validate the check result type
      if isinstance(check_result, CheckFailure):
          return
      if not isinstance(check_result, CheckResult):
          raise DeepchecksValueError(
              f"Check {check.name()} expected to return CheckResult but got: "
              + type(check_result).__name__
          )
  
      # Set reference between the check result and check
      check_result.check = check
      # Calculate conditions results
      check_result.process_conditions()
  
      # Add sampling footnote if needed
      if (
          not hasattr(check, "n_samples")
          or getattr(check, "n_samples") is None
      ):
          return
  
      n_samples = getattr(check, "n_samples")
      message = ""
      if dataset_kind:
          dataset = self.get_data_by_kind(dataset_kind)
          if n_samples < dataset.number_of_images_cached:
              message = f"Sampling procedure took place, check used {n_samples} images from the original dataset."
      else:
          if (
              self._train is not None
              and n_samples < self._train.number_of_images_cached
          ):
              message += (
                  f"Sampling procedure took place in <b>{self._train.name}</b> dataset, check used "
                  f"{n_samples} images from the original dataset.</br>"
              )
          if (
              self._test is not None
              and n_samples < self._test.number_of_images_cached
          ):
              message += (
                  f"Sampling procedure took place in <b>{self._test.name}</b> dataset, check used "
                  f"{n_samples} images from the original dataset.</br>"
              )
  
      if message:
          message = (
              '<p style="font-size:0.9em;line-height:1;"><i>'
              f'Note - data sampling: {message} Sample size can be controlled with the "n_samples" '
              "parameter.</i></p>"
          )
          check_result.display.append(message)
  
file_path: deepchecks/deepchecks/vision/context.py
imports: from typing import Optional
  from deepchecks.core import CheckFailure, CheckResult, DatasetKind
  from deepchecks.core.context import BaseContext
  from deepchecks.core.errors import DatasetValidationError, DeepchecksNotSupportedError, DeepchecksValueError
  from deepchecks.utils.plot import DEFAULT_DATASET_NAMES
  from deepchecks.vision._shared_docs import docstrings
  from deepchecks.vision.vision_data import TaskType, VisionData
  from deepchecks.vision.vision_data.utils import set_seeds, validate_vision_data_compatibility
label_desc: Use image node_id 6 for calling the Context obj's underlying member method code with example usage: obj.finalize_check_result(check_result, check, dataset_kind) without return types