code: def testPearsonCorrelationCoefficient(self):
      predictions = np.random.rand(12, 1)
      targets = np.random.rand(12, 1)
  
      expected = np.corrcoef(
          np.squeeze(predictions), np.squeeze(targets)
      )[0][1]
      with self.test_session() as session:
          pearson, _ = metrics.pearson_correlation_coefficient(
              tf.constant(predictions, dtype=tf.float32),
              tf.constant(targets, dtype=tf.float32),
          )
          session.run(tf.global_variables_initializer())
          session.run(tf.local_variables_initializer())
          actual = session.run(pearson)
      self.assertAlmostEqual(actual, expected)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.utils import metrics
  import tensorflow.compat.v1
label_desc: Use image node_id 22 for calling the MetricsTest obj's underlying member method code with example usage: obj.testPearsonCorrelationCoefficient() without return types