code: def linear_interpolation(x, xp, fp, **kwargs):
      """Multi-dimensional linear interpolation.
  
      Returns the multi-dimensional piecewise linear interpolant to a function with
      given discrete data points (xp, fp), evaluated at x.
  
      Note that *N and *M indicate zero or more dimensions.
  
      Args:
        x: An array of shape [*N], the x-coordinates of the interpolated values.
        xp: An np.array of shape [D], the x-coordinates of the data points, must be
          increasing.
        fp: An np.array of shape [D, *M], the y-coordinates of the data points.
        **kwargs: Keywords for np.interp.
  
      Returns:
        An array of shape [*N, *M], the interpolated values.
      """
      yp = fp.reshape([fp.shape[0], -1]).transpose()
      y = np.stack(
          [np.interp(x, xp, zp, **kwargs) for zp in yp]
      ).transpose()
      return y.reshape(x.shape[:1] + fp.shape[1:]).astype(np.float32)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import os
  import numpy
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_problems
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling a global function with example usage: linear_interpolation(x, xp, fp) and returns: y