code: def test_dataframe_iterator_class_mode_raw(all_test_images, tmpdir):
      # save the images in the paths
      filenames = []
      count = 0
      for test_images in all_test_images:
          for im in test_images:
              filename = "image-{}.png".format(count)
              im.save(str(tmpdir / filename))
              filenames.append(filename)
              count += 1
      # case for 1D output
      df = pd.DataFrame({"filename": filenames}).assign(
          output_0=np.random.uniform(size=len(filenames)),
          output_1=np.random.uniform(size=len(filenames)),
      )
      df_iterator = (
          image_data_generator.ImageDataGenerator().flow_from_dataframe(
              df,
              y_col="output_0",
              directory=str(tmpdir),
              batch_size=3,
              shuffle=False,
              class_mode="raw",
          )
      )
      batch_x, batch_y = next(df_iterator)
      assert isinstance(batch_x, np.ndarray)
      assert len(batch_x.shape) == 4
      assert isinstance(batch_y, np.ndarray)
      assert batch_y.shape == (3,)
      assert np.array_equal(batch_y, df["output_0"].values[:3])
      # case with a 2D output
      df_iterator = (
          image_data_generator.ImageDataGenerator().flow_from_dataframe(
              df,
              y_col=["output_0", "output_1"],
              directory=str(tmpdir),
              batch_size=3,
              shuffle=False,
              class_mode="raw",
          )
      )
      batch_x, batch_y = next(df_iterator)
      assert isinstance(batch_x, np.ndarray)
      assert len(batch_x.shape) == 4
      assert isinstance(batch_y, np.ndarray)
      assert batch_y.shape == (3, 2)
      assert np.array_equal(
          batch_y, df[["output_0", "output_1"]].values[:3]
      )
  
imports: import os
  import random
  import shutil
  import numpy
  import pandas
  import pytest
  from PIL import Image
  from keras_preprocessing.image import dataframe_iterator, image_data_generator
label_desc: Use image node_id 8 for calling a global function with example usage: test_dataframe_iterator_class_mode_raw(all_test_images, tmpdir) without return types