code: def _print_alignment(
      alignment,
      a,
      b,
      empty_symbol="<eps>",
      separator=" ; ",
      file=sys.stdout,
  ):
      # First, get equal length text for all:
      a_padded = []
      b_padded = []
      ops_padded = []
      for op, i, j in alignment:  # i indexes a, j indexes b
          op_string = str(op)
          a_string = str(a[i]) if i is not None else empty_symbol
          b_string = str(b[j]) if j is not None else empty_symbol
          # NOTE: the padding does not actually compute printed length,
          # but hopefully we can assume that printed length is
          # at most the str len
          pad_length = max(len(op_string), len(a_string), len(b_string))
          a_padded.append(a_string.center(pad_length))
          b_padded.append(b_string.center(pad_length))
          ops_padded.append(op_string.center(pad_length))
      # Then print, in the order Ref, op, Hyp
      print(separator.join(a_padded), file=file)
      print(separator.join(ops_padded), file=file)
      print(separator.join(b_padded), file=file)
  
file_path: speechbrain/speechbrain/dataio/wer.py
imports: import sys
  from speechbrain.utils import edit_distance
label_desc: Use image node_id 5 for calling a global function with example usage: _print_alignment(alignment, a, b, empty_symbol, separator, file) without return types