code: def test_unique_util_with_all_missing_values():
      # test for all types of missing values for object dtype
      values = np.array(
          [np.nan, "a", "c", "c", None, float("nan"), None],
          dtype=object,
      )
  
      uniques = _unique(values)
      assert_array_equal(uniques[:-1], ["a", "c", None])
      # last value is nan
      assert np.isnan(uniques[-1])
  
      expected_inverse = [3, 0, 1, 1, 2, 3, 2]
      _, inverse = _unique(values, return_inverse=True)
      assert_array_equal(inverse, expected_inverse)
  
file_path: scikit-learn/sklearn/utils/tests/test_encode.py
imports: import pickle
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from sklearn.utils._encode import _check_unknown, _encode, _get_counts, _unique
label_desc: Use image node_id 8 for calling a global function with example usage: test_unique_util_with_all_missing_values() without return types