code: def test_with_drift_rgb(coco_visiondata_train, coco_visiondata_test):
      # Arrange
      def collate_generate_drift(batch):
          images, labels = collate_without_model(batch)
          return {
              "images": pil_drift_formatter(images),
              "labels": labels,
          }
  
      drifted_train = replace_collate_fn_visiondata(
          coco_visiondata_train, collate_generate_drift
      )
  
      check = ImageDatasetDrift(
          categorical_drift_method="PSI"
      ).add_condition_drift_score_less_than()
      # Act
      result = check.run(drifted_train, coco_visiondata_test)
      # Assert
      assert_that(
          result.value,
          has_entries(
              {
                  "domain_classifier_auc": close_to(0.977, 0.001),
                  "domain_classifier_drift_score": close_to(
                      0.955, 0.001
                  ),
                  "domain_classifier_feature_importance": has_entries(
                      {
                          "Brightness": close_to(0.967, 0.001),
                      }
                  ),
              }
          ),
      )
      assert_that(
          result.conditions_results[0],
          equal_condition_result(
              is_pass=False,
              name=f"Drift score is less than 0.1",
              details=f"Drift score 0.955 is not less than 0.1",
          ),
      )
  
file_path: deepchecks/tests/vision/checks/train_test_validation/image_dataset_drift_test.py
imports: import numpy
  from hamcrest import assert_that, close_to, equal_to, greater_than, has_entries, has_length
  from deepchecks.vision.checks import ImageDatasetDrift
  from deepchecks.vision.datasets.detection.coco_torch import collate_without_model
  from deepchecks.vision.utils.test_utils import replace_collate_fn_visiondata
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 8 for calling a global function with example usage: test_with_drift_rgb(coco_visiondata_train, coco_visiondata_test) and returns: dict