code: def test_partition_pixels():
      truth = (102, 159, 181)
      img, shape = get_test_image_and_shape()
  
      assert dlib.partition_pixels(img) == truth[0]
      assert dlib.partition_pixels(img, 3) == truth
  
      # Call all these versions of this mainly to make sure binding to
      # various image types works.
      assert dlib.partition_pixels(img[:, :, 0].astype("uint8")) == 125
      assert (
          dlib.partition_pixels(img[:, :, 0].astype("float32")) == 125
      )
      assert (
          dlib.partition_pixels(img[:, :, 0].astype("float64")) == 125
      )
      assert dlib.partition_pixels(img[:, :, 0].astype("uint16")) == 125
      assert dlib.partition_pixels(img[:, :, 0].astype("uint32")) == 125
  
file_path: dlib/tools/python/test/test_numpy_returns.py
imports: import sys
  import pickle
  import dlib
  import pytest
  import utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_partition_pixels() without return types