def test_pearson_function(self):
        """Test the functional API for Pearson Correlation Coefficient."""
        y_true, y_pred, _, pcc_expected = self._get_data()
        result = correlation_metrics.pearson_correlation(
            y_true, y_pred, axis=-1
        )
        self.assertAllClose(result, pcc_expected)
Test the functional API for Pearson Correlation Coefficient.
keras/src/metrics/correlation_metrics_test.py