code: def test_initialization_of_vision_data_with_bad_image_format():
      # Arrange
      loader_value_out_of_shape = DataLoader(
          dataset=[
              (torch.ones((3, 3)) * 3, 1),
              (torch.ones((3, 3)) * 2, 1),
          ],
          collate_fn=_simple_batch_collate,
      )
      loader_value_dim_out_of_shape = DataLoader(
          dataset=[
              (torch.ones((2, 2, 2)) * 3, 1),
              (torch.ones((2, 2, 2)) * 2, 1),
          ],
          collate_fn=_simple_batch_collate,
      )
      loader_value_out_of_scale = DataLoader(
          dataset=[
              (torch.ones((3, 3, 3)), 1),
              (torch.ones((3, 3, 3)), 1),
          ],
          collate_fn=_simple_batch_collate,
      )
  
      # Assert
      assert_that(
          calling(VisionData).with_args(
              loader_value_out_of_shape, TaskType.CLASSIFICATION.value
          ),
          raises(
              ValidationError,
              r"The image inside the iterable must be a 3D array.",
          ),
      )
      assert_that(
          calling(VisionData).with_args(
              loader_value_out_of_scale, TaskType.CLASSIFICATION.value
          ),
          raises(
              ValidationError,
              r"Image data should be in uint8 format\(integers between 0 and 255\), found values in range \[1.0, 1.0\].",
          ),
      )
      assert_that(
          calling(VisionData).with_args(
              loader_value_dim_out_of_shape,
              TaskType.CLASSIFICATION.value,
          ),
          raises(
              ValidationError,
              r"The image inside the iterable must have 1 or 3 channels.",
          ),
      )
  
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 5 for calling a global function with example usage: test_initialization_of_vision_data_with_bad_image_format() without return types