code: def recover_global_permutation():
      """
      Find the way that the encoded images are permuted off of the original images
      """
      global global_permutation
  
      print("Glob match", global_matching)
      overall = []
      for i, j in enumerate(global_matching):
          overall.append(
              np.sum(
                  xs_image[j][None, :, :] * ys_image[i][:, None, :],
                  axis=2,
              )
          )
  
      overall = np.mean(overall, 0)
  
      row, col = scipy.optimize.linear_sum_assignment(-overall)
  
      try:
          print(
              "Changed frac:",
              np.mean(global_permutation != np.argsort(col)),
          )
      except:
          pass
  
      global_permutation = np.argsort(col)
  
imports: import collections
  import hashlib
  import time
  import multiprocessing
  import torch
  import numpy
  import torch.nn
  import scipy.stats
  import matplotlib.pyplot
  from PIL import Image
  import jax
  import jax.numpy
  import objax
  import scipy.optimize
  import numpy
  import multiprocessing
label_desc: Use image node_id 14 for calling a global function with example usage: recover_global_permutation() without return types