code: def test_vision_data_task_type_inference(
      mnist_visiondata_train,
      coco_visiondata_train,
      segmentation_coco_visiondata_train,
  ):
      # Assert
      assert_that(
          mnist_visiondata_train.task_type == TaskType.CLASSIFICATION
      )
      assert_that(
          coco_visiondata_train.task_type == TaskType.OBJECT_DETECTION
      )
      assert_that(
          segmentation_coco_visiondata_train.task_type
          == TaskType.SEMANTIC_SEGMENTATION
      )
  
imports: import numpy
  import pytest
  import torch
  from hamcrest import assert_that, calling, equal_to, has_length, is_not, raises
  from torch.utils.data import DataLoader
  from deepchecks.core.errors import DatasetValidationError, ValidationError
  from deepchecks.vision.datasets.classification.mnist_torch import IterableTorchMnistDataset, collate_without_model
  from deepchecks.vision.datasets.detection import coco_torch
  from deepchecks.vision.datasets.segmentation import segmentation_coco
  from deepchecks.vision.utils.test_utils import replace_collate_fn_dataloader
  from deepchecks.vision.vision_data import TaskType, VisionData
  from deepchecks.vision.vision_data.utils import validate_vision_data_compatibility
  from tests.vision.conftest import run_update_loop
label_desc: Use image node_id 4 for calling a global function with example usage: test_vision_data_task_type_inference(mnist_visiondata_train, coco_visiondata_train, segmentation_coco_visiondata_train) without return types