code: def Kuf_matern12_fourierfeatures1d(inducing_variable, kernel, X):
      X = tf.squeeze(X, axis=1)
      a, b, ms = (lambda u: (u.a, u.b, u.ms))(inducing_variable)
  
      omegas = 2.0 * np.pi * ms / (b - a)
      Kuf_cos = tf.cos(omegas[:, None] * (X[None, :] - a))
      omegas_sin = omegas[
          tf.not_equal(omegas, 0)
      ]  # don't compute zero frequency
      Kuf_sin = tf.sin(omegas_sin[:, None] * (X[None, :] - a))
  
      # correct Kuf outside [a, b] -- see Table 1
      Kuf_sin = tf.where(
          (X < a) | (X > b), tf.zeros_like(Kuf_sin), Kuf_sin
      )  # just zero
  
      left_tail = tf.exp(-tf.abs(X - a) / kernel.lengthscales)[None, :]
      right_tail = tf.exp(-tf.abs(X - b) / kernel.lengthscales)[None, :]
      Kuf_cos = tf.where(
          X < a, left_tail, Kuf_cos
      )  # replace with left tail
      Kuf_cos = tf.where(
          X > b, right_tail, Kuf_cos
      )  # replace with right tail
  
      return tf.concat([Kuf_cos, Kuf_sin], axis=0)
  
imports: import numpy
  import tensorflow
  from check_shapes import Shape
  import gpflow
  from gpflow import covariances
  from gpflow import kullback_leiblers
  from gpflow.base import TensorLike
  from gpflow.ci_utils import reduce_in_tests
  from gpflow.inducing_variables import InducingVariables
  from gpflow.utilities import to_default_float
  import matplotlib.pyplot
  import gpflow.posteriors
label_desc: Use image node_id 2 for calling a global function with example usage: Kuf_matern12_fourierfeatures1d(inducing_variable, kernel, X) and returns: tf