code: def permutation_schemes(num_spkrs):
      src = [x for x in range(1, num_spkrs + 1)]
      perms = []
  
      # get all permutations of [1, ..., num_spkrs]
      # [[r1h1, r2h2], [r1h2, r2h1]]
      # [[r1h1, r2h2, r3h3], [r1h1, r2h3, r3h2], [r1h2, r2h1, r3h3],
      #  [r1h2, r2h3, r3h2], [r1h3, r2h2, r3h1], [r1h3, r2h1, r3h2]]]
      # ...
      permutationDFS(np.array(src), 0, perms)
  
      keys = []
      for perm in perms:
          keys.append(
              ["r%dh%d" % (i, j) for i, j in enumerate(perm, 1)]
          )
  
      return sum(keys, []), keys
  
file_path: espnet/utils/eval_perm_free_error.py
imports: import argparse
  import codecs
  import json
  import logging
  import re
  import sys
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: permutation_schemes(num_spkrs) and returns: sum,  keys