code: def test_load_image_target_size_grayscale_true(preprocess_mocker):
      load_image(
          image_file=PATH_SINGLE_IMAGE,
          target_size=(8, 8),
          grayscale=True,
      )
      preprocess_mocker.assert_called_once_with(
          Image.open(PATH_SINGLE_IMAGE),
          target_size=(8, 8),
          grayscale=True,
      )
  
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 22 for calling a global function with example usage: test_load_image_target_size_grayscale_true(preprocess_mocker) without return types