code: def test_ResizeChannels_module_with_batch_dim(
      image_shape, num_channels_expected
  ):
      image = torch.randint(0, 1, image_shape)
      fn = ResizeChannels(num_channels_expected)
      assert fn(image).shape == tuple(
          [image_shape[0], num_channels_expected]
          + list(image_shape[2:])
      )
  
file_path: ludwig/tests/ludwig/utils/test_image_utils.py
imports: from typing import Callable
  import pytest
  import torch
  import torchvision.transforms.functional
  from ludwig.utils.image_utils import crop, crop_or_pad, grayscale, is_image_score, num_channels_in_image, pad, read_image_as_tif, resize_image, ResizeChannels
label_desc: Use image node_id 8 for calling a global function with example usage: test_ResizeChannels_module_with_batch_dim(image_shape, num_channels_expected) without return types