code: def test_warnings(df):
      """
      Test that warnings are raised if categories is provided, and
      the categories do not match the unique values in the column, or
      some values in the column are missing in the categories provided.
      """
      with pytest.warns(UserWarning):
          df.encode_categorical(
              numbers=[4, 5, 6], names=["John", "Mark", "Luke"]
          )
  
imports: import datetime
  import numpy
  import pandas
  import pytest
  from hypothesis import given, settings
  from pandas.testing import assert_frame_equal
  from janitor.testing_utils.strategies import categoricaldf_strategy, df_strategy
label_desc: Use image node_id 16 for calling a global function with example usage: test_warnings(df) without return types