code: def realign_seqs(block, gap_char='.', align_indels=False):
      
      # ENH: align inserts using an external tool (if align_indels)
      all_chars = [list(sq['seq']) for sq in block['sequences']]
      # NB: If speed is an issue here, consider Numpy or Cython
      #   main problem: list.insert is O(n) -- would OrderedDict help?
      nrows = len(all_chars)
      i = 0
      while i < len(all_chars[0]):
          rows_need_gaps = [r for r in all_chars if not r[i].islower()]
          if len(rows_need_gaps) != nrows:
              for row in rows_need_gaps:
                  row.insert(i, gap_char)
          i += 1
      return [''.join(row) for row in all_chars]
docs: Add gaps to a block so all residues in a column are equivalent.
  
      Given a block, containing a list of "sequences" (dicts) each containing a
      "seq" (actual string sequence, where upper=match, lower=insert, dash=gap),
      insert gaps (- or .) into the sequences s.t.
  
      1. columns line up properly, and
      2. all resulting sequences have the same length
  
  
      The reason this needs to be done is that the query/consensus sequence is not
      assigned gaps to account for inserts in the other sequences. We need to add
      the gaps back to obtain a normal alignment.
  
      `return`: a list of realigned sequence strings.