code: def th_pearsonr(x, y):
      """
      mimics scipy.stats.pearsonr
      """
      mean_x = th.mean(x)
      mean_y = th.mean(y)
      xm = x.sub(mean_x)
      ym = y.sub(mean_y)
      r_num = xm.dot(ym)
      r_den = th.norm(xm, 2) * th.norm(ym, 2)
      r_val = r_num / r_den
      return r_val
  
imports: import pickle
  import random
  from .optimizers import *
  from .callbacks import *
  import torch
  from pywick.callbacks import *
label_desc: Use image node_id 18 for calling a global function with example usage: th_pearsonr(x, y) and returns: r_val