code: def test_nan(
      df_with_single_nans_in_different_rows, df_with_single_nan_in_col
  ):
      train_dataset = Dataset(
          pd.DataFrame(
              data=df_with_single_nans_in_different_rows,
              columns=["col1", "col2"],
          ),
          cat_features=["col1", "col2"],
      )
      test_dataset = Dataset(
          pd.DataFrame(
              data=df_with_single_nan_in_col, columns=["col1", "col2"]
          ),
          cat_features=["col1", "col2"],
      )
  
      # Arrange
      check = NewCategoryTrainTest()
      # Act X
      result = check.run(
          train_dataset=train_dataset, test_dataset=test_dataset
      ).value
      # Assert
      assert_that(max(result["# New Categories"]), equal_to(1))
      assert_that(
          max(result["Ratio of New Categories"]), close_to(0.09, 0.01)
      )
      assert_that(result["New categories"]["col2"], equal_to([5]))
  
imports: import pandas
  from hamcrest import assert_that, calling, close_to, equal_to, greater_than, has_items, has_length, raises
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.tabular.checks.train_test_validation import NewCategoryTrainTest
  from deepchecks.tabular.dataset import Dataset
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 10 for calling a global function with example usage: test_nan(df_with_single_nans_in_different_rows, df_with_single_nan_in_col) without return types