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: Assert task_type matching given types.
docstr_tok: ["Assert","task_type","matching","given","types","."]
code: def assert_task_type(self, *expected_types: TaskType):
      """Assert task_type matching given types."""
      if self.train.task_type not in expected_types:
          raise DeepchecksNotSupportedError(
              f"Check is irrelevant for task of type {self.train.task_type}"
          )
      return True
  
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 4 for calling the Context obj's underlying member method code with example usage: obj.assert_task_type() and returns: True