code: def test_load_image_accepts_pil(mocker):
      preprocess_mocker = mocker.patch(
          "imagededup.utils.image_utils.preprocess_image"
      )
      load_image(PATH_SINGLE_IMAGE)
      preprocess_mocker.assert_called_once_with(
          Image.open(PATH_SINGLE_IMAGE),
          target_size=None,
          grayscale=False,
      )
  
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 18 for calling a global function with example usage: test_load_image_accepts_pil(mocker) without return types