code: def _solve_interpolation(
      train_points: TensorLike,
      train_values: TensorLike,
      order: int,
      regularization_weight: FloatTensorLike,
  ) -> TensorLike:
      r"""Solve for interpolation coefficients.
  
      Computes the coefficients of the polyharmonic interpolant for the
      'training' data defined by `(train_points, train_values)` using the kernel
      $\phi$.
  
      Args:
        train_points: `[b, n, d]` interpolation centers.
        train_values: `[b, n, k]` function values.
        order: order of the interpolation.
        regularization_weight: weight to place on smoothness regularization term.
  
      Returns:
        w: `[b, n, k]` weights on each interpolation center
        v: `[b, d, k]` weights on each input dimension
      Raises:
        ValueError: if d or k is not fully specified.
      """
  
      # These dimensions are set dynamically at runtime.
      b, n, _ = tf.unstack(tf.shape(train_points), num=3)
  
      d = train_points.shape[-1]
      if d is None:
          raise ValueError(
              "The dimensionality of the input points (d) must be "
              "statically-inferrable."
          )
  
      k = train_values.shape[-1]
      if k is None:
          raise ValueError(
              "The dimensionality of the output values (k) must be "
              "statically-inferrable."
          )
  
      # First, rename variables so that the notation (c, f, w, v, A, B, etc.)
      # follows https://en.wikipedia.org/wiki/Polyharmonic_spline.
      # To account for python style guidelines we use
      # matrix_a for A and matrix_b for B.
  
      c = train_points
      f = train_values
  
      # Next, construct the linear system.
      with tf.name_scope("construct_linear_system"):
          matrix_a = _phi(
              _pairwise_squared_distance_matrix(c), order
          )  # [b, n, n]
          if regularization_weight > 0:
              batch_identity_matrix = tf.expand_dims(
                  tf.eye(n, dtype=c.dtype), 0
              )
              matrix_a += regularization_weight * batch_identity_matrix
  
          # Append ones to the feature values for the bias term
          # in the linear model.
          ones = tf.ones_like(c[..., :1], dtype=c.dtype)
          matrix_b = tf.concat([c, ones], 2)  # [b, n, d + 1]
  
          # [b, n + d + 1, n]
          left_block = tf.concat(
              [matrix_a, tf.transpose(matrix_b, [0, 2, 1])], 1
          )
  
          num_b_cols = matrix_b.get_shape()[2]  # d + 1
          lhs_zeros = tf.zeros(
              [b, num_b_cols, num_b_cols], train_points.dtype
          )
          right_block = tf.concat(
              [matrix_b, lhs_zeros], 1
          )  # [b, n + d + 1, d + 1]
          lhs = tf.concat(
              [left_block, right_block], 2
          )  # [b, n + d + 1, n + d + 1]
  
          rhs_zeros = tf.zeros([b, d + 1, k], train_points.dtype)
          rhs = tf.concat([f, rhs_zeros], 1)  # [b, n + d + 1, k]
  
      # Then, solve the linear system and unpack the results.
      with tf.name_scope("solve_linear_system"):
          w_v = tf.linalg.solve(lhs, rhs)
          w = w_v[:, :n, :]
          v = w_v[:, n:, :]
  
      return w, v
  
file_path: addons/tensorflow_addons/image/interpolate_spline.py
imports: import tensorflow
  from tensorflow_addons.utils.types import FloatTensorLike, TensorLike
label_desc: Use image node_id 3 for calling a global function with example usage: _solve_interpolation(train_points, train_values, order, regularization_weight) and returns: w,  v