code: def sparse_image_warp(
      img_tensor,
      source_control_point_locations,
      dest_control_point_locations,
      interpolation_order=2,
      regularization_weight=0.0,
      num_boundaries_points=0,
  ):
      device = img_tensor.device
      control_point_flows = (
          dest_control_point_locations - source_control_point_locations
      )
  
      batch_size, image_height, image_width = img_tensor.shape
      flattened_grid_locations = get_flat_grid_locations(
          image_height, image_width, device
      )
  
      flattened_flows = interpolate_spline(
          dest_control_point_locations,
          control_point_flows,
          flattened_grid_locations,
          interpolation_order,
          regularization_weight,
      )
  
      dense_flows = create_dense_flows(
          flattened_flows, batch_size, image_height, image_width
      )
  
      warped_image = dense_image_warp(img_tensor, dense_flows)
  
      return warped_image, dense_flows
  
file_path: espnet/espnet/utils/spec_augment.py
imports: import random
  import torch
label_desc: Use image node_id 5 for calling a global function with example usage: sparse_image_warp(img_tensor, source_control_point_locations, dest_control_point_locations, interpolation_order, regularization_weight, num_boundaries_points) and returns: warped_image,  dense_flows