code: def number_letters(block_or_record, key=None):
      
      if key:
          logging.warn("DEPRECATED: Pass a record instead")
          assert 'sequences' in block_or_record, "Expected a block and a key"
          record = find_seq_rec(block_or_record, key)
      else:
          assert 'id' in block_or_record, "Expected argument to be a record"
          record = block_or_record
      # Ungapped sequence -- accounts for dels vs. consensus
      seq = record['seq'].replace('-', '').replace('.', '')
      # Difference between string positions and residue numbers
      shift = record['head_len'] + 1
      return dict((idx + shift, letter)
                  for idx, letter in enumerate(seq))
docs: Return a dict of {posn: restype} for each letter in the sequence.