code: def test_no_sklearn(mock_no_sklearn):
      with pytest.raises(
          ModuleNotFoundError,
          match=r"This contrib module requires scikit-learn to be installed.",
      ):
          AveragePrecision()
  
imports: import os
  from unittest.mock import patch
  import pytest
  import sklearn
  import torch
  from sklearn.metrics import average_precision_score
  import ignite.distributed
  from ignite.contrib.metrics import AveragePrecision
  from ignite.engine import Engine
  from ignite.exceptions import NotComputableError
label_desc: Use image node_id 2 for calling a global function with example usage: test_no_sklearn(mock_no_sklearn) without return types