code: def test_image_regressor(tmp_path):
      train_x = test_utils.generate_data(
          num_instances=NUM_INSTANCES, shape=(32, 32, 3)
      )
      train_y = test_utils.generate_data(
          num_instances=NUM_INSTANCES, shape=(1,)
      )
      clf = ak.ImageRegressor(
          directory=tmp_path, max_trials=2, seed=test_utils.SEED
      )
      clf.fit(
          train_x,
          train_y,
          epochs=1,
          validation_split=0.2,
          batch_size=BATCH_SIZE,
      )
      clf.export_model()
      assert clf.predict(train_x).shape == (len(train_x), 1)
  
file_path: autokeras/autokeras/integration_tests/task_api_test.py
imports: import numpy
  import pandas
  import tensorflow
  from tensorflow import keras
  import autokeras
  from autokeras import test_utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_image_regressor(tmp_path) without return types