code: def ttest_rel(a, b, axis=0, nan_policy="propagate"):
      if nan_policy != "propagate":
          raise NotImplementedError(
              "`nan_policy` other than 'propagate' have not been implemented."
          )
  
      n = a.shape[axis]
      df = float(n - 1)
  
      d = (a - b).astype(np.float64)
      v = da.var(d, axis, ddof=1)
      dm = da.mean(d, axis)
      denom = da.sqrt(v / float(n))
  
      with np.errstate(divide="ignore", invalid="ignore"):
          t = da.divide(dm, denom)
      t, prob = _ttest_finish(df, t)
  
      return delayed(Ttest_relResult, nout=2)(t, prob)
  
imports: from __future__ import annotations
  import math
  from collections import namedtuple
  import numpy
  import dask.array
  from dask import delayed
  from dask.array.ufunc import wrap_elemwise
  from dask.utils import derived_from
  from scipy import special
  from scipy.stats import distributions
label_desc: Use image node_id 3 for calling a global function with example usage: ttest_rel(a, b, axis, nan_policy) and returns: delayed