docs: def get_deletions(aln_df):
      """Get a list of tuples indicating the first and last residues of a deletion region, as well as the length of the deletion.
  
      Examples:
          # Deletion of residues 1 to 4, length 4
          >>> test = {'id_a': {0: 'a', 1: 'a', 2: 'a', 3: 'a'}, 'id_a_aa': {0: 'M', 1: 'G', 2: 'I', 3: 'T'}, 'id_a_pos': {0: 1.0, 1: 2.0, 2: 3.0, 3: 4.0}, 'id_b': {0: 'b', 1: 'b', 2: 'b', 3: 'b'}, 'id_b_aa': {0: np.nan, 1: np.nan, 2: np.nan, 3: np.nan}, 'id_b_pos': {0: np.nan, 1: np.nan, 2: np.nan, 3: np.nan}, 'type': {0: 'deletion', 1: 'deletion', 2: 'deletion', 3: 'deletion'}}
          >>> my_alignment = pd.DataFrame.from_dict(test)
          >>> get_deletions(my_alignment)
          [((1.0, 4.0), 4)]
  
      Args:
          aln_df (DataFrame): Alignment DataFrame
  
      Returns:
          list: A list of tuples with the format ((deletion_start_resnum, deletion_end_resnum), deletion_length)
  
      """
  
      deletion_df = aln_df[aln_df['type'] == 'deletion']
      if not deletion_df.empty:
          deletion_df['id_a_pos'] = deletion_df['id_a_pos'].astype(int)
      deletions = []
  
      for k, g in groupby(deletion_df.index, key=lambda n, c=count(): n - next(c)):
          tmp = list(g)
          deletion_indices = (min(tmp), max(tmp))
  
          deletion_start_ix = deletion_indices[0]
          deletion_end_ix = deletion_indices[1]
  
          deletion_length = deletion_end_ix - deletion_start_ix + 1
  
          id_a_pos_deletion_start = aln_df.ix[deletion_start_ix].id_a_pos
          id_a_pos_deletion_end = aln_df.ix[deletion_end_ix].id_a_pos
  
          deletion_region = (id_a_pos_deletion_start, id_a_pos_deletion_end)
  
          # Logging where the insertion is
          log.debug('Deletion of length {} at residues {}'.format(deletion_length, deletion_region))
  
          to_append = (deletion_region, deletion_length)
          deletions.append(to_append)
  
      return deletions