code: def test_zero_precision_recall(setup):
      # Check that pathological cases do not bring NaNs
  
      old_error_settings = np.seterr(all="raise")
  
      try:
          y_true = mt.array([0, 1, 2, 0, 1, 2], chunk_size=4)
          y_pred = mt.array([2, 0, 1, 1, 2, 0], chunk_size=4)
  
          assert_almost_equal(
              precision_score(y_true, y_pred, average="macro")
              .execute()
              .fetch(),
              0.0,
              2,
          )
          assert_almost_equal(
              recall_score(y_true, y_pred, average="macro")
              .execute()
              .fetch(),
              0.0,
              2,
          )
          assert_almost_equal(
              f1_score(y_true, y_pred, average="macro")
              .execute()
              .fetch(),
              0.0,
              2,
          )
  
      finally:
          np.seterr(**old_error_settings)
  
imports: import numpy
  import pytest
  from sklearn import datasets, svm
  from sklearn.exceptions import UndefinedMetricWarning
  from sklearn.metrics import accuracy_score
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_almost_equal, assert_array_equal, assert_array_almost_equal
  from sklearn.utils._mocking import MockDataFrame
  from ....None import execute, fetch
  from ....None import tensor
  from ....lib.sparse import SparseNDArray
  from ..None import accuracy_score, log_loss
  from .._classification import _check_targets, multilabel_confusion_matrix, precision_recall_fscore_support, precision_score, recall_score, f1_score, fbeta_score
label_desc: Use image node_id 14 for calling a global function with example usage: test_zero_precision_recall(setup) without return types