def METHOD_NAME(self, input_param, filenames, original_channel_dim):
    if original_channel_dim is None:
        test_image = np.random.rand(8, 8, 8)
    elif original_channel_dim == -1:
        test_image = np.random.rand(8, 8, 8, 1)
    with tempfile.TemporaryDirectory() as tempdir:
        for i, name in enumerate(filenames):
            filenames[i] = os.path.join(tempdir, name)
            nib.save(nib.Nifti1Image(test_image, np.eye(4)), filenames[i])
        result = LoadImage(image_only=True, **input_param)(filenames)
        result = EnsureChannelFirst()(result)
        self.assertEqual(result.shape[0], len(filenames))