code: def test_check_unknown_with_both_missing_values():
      # test for both types of missing values for object dtype
      values = np.array(
          [np.nan, "a", "c", "c", None, np.nan, None], dtype=object
      )
  
      diff = _check_unknown(
          values, known_values=np.array(["a", "c"], dtype=object)
      )
      assert diff[0] is None
      assert np.isnan(diff[1])
  
      diff, valid_mask = _check_unknown(
          values,
          known_values=np.array(["a", "c"], dtype=object),
          return_mask=True,
      )
  
      assert diff[0] is None
      assert np.isnan(diff[1])
      assert_array_equal(
          valid_mask, [False, True, True, True, False, False, False]
      )
  
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 9 for calling a global function with example usage: test_check_unknown_with_both_missing_values() without return types