code: def _coord_grid_to_mesh_grid(coord_grid):
      if len(coord_grid) == 1:
          return tf.expand_dims(coord_grid[0], 0)
      x_meshgrid = tf.stack(
          values=tf.meshgrid(*coord_grid, indexing="ij"), axis=-1
      )
      perm = [len(coord_grid)] + list(range(len(coord_grid)))
      return tf.transpose(x_meshgrid, perm=perm)
  
file_path: tf-quant-finance/tf_quant_finance/models/hjm/swaption_pricing.py
imports: from typing import Callable, Union
  import tensorflow.compat.v2
  from tf_quant_finance import types
  from tf_quant_finance.math import pde
  from tf_quant_finance.math import random
  from tf_quant_finance.models import utils
  from tf_quant_finance.models import valuation_method
  from tf_quant_finance.models.hjm import gaussian_hjm
  from tf_quant_finance.models.hjm import quasi_gaussian_hjm
  from tf_quant_finance.models.hjm import swaption_util
label_desc: Use image node_id 4 for calling a global function with example usage: _coord_grid_to_mesh_grid(coord_grid) and returns: tf, tf