code: def test_coco(coco_visiondata_test):
      # Arrange
      check = (
          MeanAveragePrecisionReport()
          .add_condition_mean_average_precision_greater_than(0.1)
          .add_condition_mean_average_precision_greater_than(0.4)
          .add_condition_average_mean_average_precision_greater_than()
          .add_condition_average_mean_average_precision_greater_than(
              0.5
          )
      )
  
      # Act
      result = check.run(coco_visiondata_test)
  
      # Assert
      df = result.value
      assert_that(df, has_length(4))
  
      assert_that(
          df.loc["All", "mAP@[.50::.95] (avg.%)"],
          close_to(0.409, 0.001),
      )
      assert_that(df.loc["All", "mAP@.50 (%)"], close_to(0.566, 0.001))
      assert_that(df.loc["All", "mAP@.75 (%)"], close_to(0.425, 0.001))
  
      assert_that(
          df.loc["Small (area < 32^2)", "mAP@[.50::.95] (avg.%)"],
          close_to(0.212, 0.001),
      )
      assert_that(
          df.loc["Small (area < 32^2)", "mAP@.50 (%)"],
          close_to(0.342, 0.001),
      )
      assert_that(
          df.loc["Small (area < 32^2)", "mAP@.75 (%)"],
          close_to(0.212, 0.001),
      )
  
      assert_that(
          df.loc[
              "Medium (32^2 < area < 96^2)", "mAP@[.50::.95] (avg.%)"
          ],
          close_to(0.383, 0.001),
      )
      assert_that(
          df.loc["Medium (32^2 < area < 96^2)", "mAP@.50 (%)"],
          close_to(0.600, 0.001),
      )
      assert_that(
          df.loc["Medium (32^2 < area < 96^2)", "mAP@.75 (%)"],
          close_to(0.349, 0.001),
      )
  
      assert_that(
          df.loc["Large (area < 96^2)", "mAP@[.50::.95] (avg.%)"],
          close_to(0.541, 0.001),
      )
      assert_that(
          df.loc["Large (area < 96^2)", "mAP@.50 (%)"],
          close_to(0.674, 0.001),
      )
      assert_that(
          df.loc["Large (area < 96^2)", "mAP@.75 (%)"],
          close_to(0.585, 0.001),
      )
  
      assert_that(
          result.conditions_results[0],
          equal_condition_result(
              is_pass=True,
              details="Found lowest score of 0.21 for area Small (area < 32^2) and IoU mAP@[.50::.95] (avg.%)",
              name="Scores are greater than 0.1",
          ),
      )
  
      assert_that(
          result.conditions_results[1],
          equal_condition_result(
              is_pass=False,
              name="Scores are greater than 0.4",
              details="Found lowest score of 0.21 for area Small (area < 32^2) and IoU mAP@[.50::.95] (avg.%)",
          ),
      )
  
      assert_that(
          result.conditions_results[2],
          equal_condition_result(
              is_pass=True,
              details="mAP score is: 0.41",
              name="mAP score is greater than 0.3",
          ),
      )
  
      assert_that(
          result.conditions_results[3],
          equal_condition_result(
              is_pass=False,
              name="mAP score is greater than 0.5",
              details="mAP score is: 0.41",
          ),
      )
  
file_path: deepchecks/tests/vision/checks/model_evaluation/mean_average_precision_report_test.py
imports: from hamcrest import assert_that, calling, close_to, greater_than, has_length, raises
  from deepchecks.core.errors import DeepchecksNotSupportedError, ModelValidationError
  from deepchecks.vision.checks import MeanAveragePrecisionReport
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 2 for calling a global function with example usage: test_coco(coco_visiondata_test) without return types