def METHOD_NAME(self, preds, target):
    """Check that sparse contingency matrices are calculated correctly."""
    tm_c = calculate_contingency_matrix(preds, target, sparse=True).to_dense().numpy()
    sklearn_c = sklearn_contingency_matrix(target, preds, sparse=True).toarray()
    assert np.allclose(tm_c, sklearn_c, atol=self.atol)