code: def test_object_detection_coco_new_labels(
      coco_visiondata_train, coco_visiondata_test
  ):
      # Arrange
      def modified_labels_collate(data):
          images, labels = coco_collate_without_model(data)
          modified_labels = []
          for idx, labels_per_image in enumerate(labels):
              if idx % 7 == 0 and labels_per_image.shape[0] > 0:
                  labels_per_image[0, -1] = 8
              if idx % 5 == 0 and labels_per_image.shape[0] > 0:
                  labels_per_image[0, -1] = 10
              modified_labels.append(labels_per_image)
          return {"images": images, "labels": modified_labels}
  
      modified_test = replace_collate_fn_visiondata(
          coco_visiondata_test, modified_labels_collate
      )
      # Act
      result = NewLabels().run(coco_visiondata_train, modified_test)
      # Assert
      assert_that(
          result.value["new_labels"],
          has_entries({"donut": 14, "tennis racket": 7}),
      )
      assert_that(result.value, has_entries(all_labels_count=387))
  
file_path: deepchecks/tests/vision/checks/train_test_validation/new_labels_test.py
imports: from hamcrest import assert_that, equal_to, greater_than, has_entries, has_items, has_length
  from deepchecks.vision.checks import NewLabels
  from deepchecks.vision.datasets.classification.mnist_torch import collate_without_model
  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 4 for calling a global function with example usage: test_object_detection_coco_new_labels(coco_visiondata_train, coco_visiondata_test) and returns: dict