code: def test_preprocess_image_accepts_array_input():
      inp_x = Image.open(PATH_SINGLE_IMAGE)
      inp_x = np.array(inp_x)
      target_size = (2, 2)
      ret_array = preprocess_image(
          inp_x, target_size=target_size, grayscale=True
      )
      assert isinstance(ret_array, np.ndarray)
      assert ret_array.shape == target_size
  
imports: import pytest
  from pathlib import Path
  import numpy
  from PIL import Image
  from imagededup.utils.image_utils import preprocess_image, load_image, _check_3_dim, _add_third_dim, _raise_wrong_dim_value_error, check_image_array_hash, expand_image_array_cnn
label_desc: Use image node_id 14 for calling a global function with example usage: test_preprocess_image_accepts_array_input() without return types