code: def test_fetch_lfw_people_internal_cropping():
      """Check that we properly crop the images.
  
      Non-regression test for:
      https://github.com/scikit-learn/scikit-learn/issues/24942
      """
      # If cropping was not done properly and we don't resize the images, the images would
      # have their original size (250x250) and the image would not fit in the NumPy array
      # pre-allocated based on `slice_` parameter.
      slice_ = (slice(70, 195), slice(78, 172))
      lfw = fetch_lfw_people(
          data_home=SCIKIT_LEARN_DATA,
          min_faces_per_person=3,
          download_if_missing=False,
          resize=None,
          slice_=slice_,
      )
      assert lfw.images[0].shape == (
          slice_[0].stop - slice_[0].start,
          slice_[1].stop - slice_[1].start,
      )
  
file_path: scikit-learn/sklearn/datasets/tests/test_lfw.py
imports: import os
  import random
  import shutil
  import tempfile
  from functools import partial
  import numpy
  import pytest
  from sklearn.datasets import fetch_lfw_pairs, fetch_lfw_people
  from sklearn.datasets.tests.test_common import check_return_X_y
  from sklearn.utils._testing import assert_array_equal
label_desc: Use image node_id 8 for calling a global function with example usage: test_fetch_lfw_people_internal_cropping() without return types