code: def _reference_pde_solution(xs, t, num_terms=5):
      """Solution for the reference diffusion equation."""
      u = tf.zeros_like(xs)
      for k in range(num_terms):
          n = 2 * k + 1
          term = tf.math.sin(np.pi * n * xs) * tf.math.exp(
              -(n**2) * np.pi**2 * t
          )
          term *= 4 / (np.pi**2 * n**2)
          if k % 2 == 1:
              term *= -1
          u += term
      return u
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 7 for calling a global function with example usage: _reference_pde_solution(xs, t, num_terms) and returns: u