code: def try_swap(matrix, dst, src):
      src_base = sum_after_2_to_4(
          matrix[..., int(src / 4) * 4 : int(src / 4) * 4 + 4]
      )
      dst_base = sum_after_2_to_4(
          matrix[..., int(dst / 4) * 4 : int(dst / 4) * 4 + 4]
      )
  
      # swap
      matrix[..., [src, dst]] = matrix[..., [dst, src]]
  
      # check the Nx4 slices of the swapped columns
      src_sum = sum_after_2_to_4(
          matrix[..., int(src / 4) * 4 : int(src / 4) * 4 + 4]
      )
      dst_sum = sum_after_2_to_4(
          matrix[..., int(dst / 4) * 4 : int(dst / 4) * 4 + 4]
      )
  
      # swap back
      matrix[..., [src, dst]] = matrix[..., [dst, src]]
  
      return src_sum + dst_sum, (src_sum + dst_sum) - (
          src_base + dst_base
      )
  
file_path: apex/apex/contrib/sparsity/permutation_search_kernels/channel_swap.py
imports: from .permutation_utilities import *
label_desc: Use image node_id 1 for calling a global function with example usage: try_swap(matrix, dst, src) and returns: unknown,  unknown