code: def sinkhorn(Q, n_iters=3, epsilon=0.01):
      # epsilon should be adjusted according to logits value's scale
      with torch.no_grad():
          Q = shoot_infs(Q)
          Q = torch.exp(Q / epsilon)
          for i in range(n_iters):
              Q /= Q.sum(dim=0, keepdim=True)
              Q /= Q.sum(dim=1, keepdim=True)
      return Q
  
imports: import os
  import copy
  import math
  import json
  import collections
  import numpy
  import pandas
  import torch
  import torch.nn
  import torch.optim
  import torch.nn.functional
  from tqdm import tqdm
  from qlib.utils import get_or_create_path
  from qlib.log import get_module_logger
  from qlib.model.base import Model
label_desc: Use image node_id 4 for calling a global function with example usage: sinkhorn(Q, n_iters, epsilon) and returns: Q