def whitespace_align_seqs(seqs):
  """Adds whitespace padding to sequence elements for vertical alignment.

  All sequence elements are cast to Unicode strings.

  Args:
    seqs (list): a list of sequences

  Returns:
    aligned_seqs (list): a list of aligned sequences
  """
  # Pad a string with spaces to a target width.
  pad = lambda s, width: u"{{:^{}}}".format(width).format(s)

  # Results will be stored here.
  aligned_seqs = [list() for _ in seqs]

  # Loop over each position.
  for vals in safe_zip(*seqs):
    text_vals = [unicode(v) for v in vals]
    max_width = max(len(v) for v in text_vals)
    for aligned_seq, text in safe_zip(aligned_seqs, text_vals):
      aligned_seq.append(pad(text, max_width))

  return aligned_seqs
Adds whitespace padding to sequence elements for vertical alignment.

  All sequence elements are cast to Unicode strings.

  Args:
    seqs (list): a list of sequences

  Returns:
    aligned_seqs (list): a list of aligned sequences
  
language/conpono/reconstruct/preprocess.py