original_docstring: 
      Find the last trace value that belongs to a valid sequence index
      (no gap -> no -1) up to the specified column.
      
docstring: Find the last trace value that belongs to a valid sequence index
  (no gap -> no -1) up to the specified column.
docstring_tokens: Find the last trace value that belongs to a valid sequence index ( no gap - > no - 1 ) up to the specified column .
code: def _get_last_valid_index(alignment, column_i, seq_i):
      """
      Find the last trace value that belongs to a valid sequence index
      (no gap -> no -1) up to the specified column.
      """
      index_found = False
      while not index_found:
          if column_i == -1:
              # Iterated from column_i back to beyond the beginning
              # and no index has been found
              # -> Terminal gap
              # -> First symbol of sequence has not occured yet
              # -> return -1
              index = -1
              index_found = True
          else:
              index = alignment.trace[column_i, seq_i]
              if index != -1:
                  index_found = True
          column_i -= 1
      return index
code_tokens: def _get_last_valid_index ( alignment , column_i , seq_i ) : index_found = False while not index_found : if column_i == - 1 : index = - 1 index_found = True else : index = alignment . trace [ column_i , seq_i ] if index != - 1 : index_found = True column_i -= 1 return index
short_docstring: Find the last trace value that belongs to a valid sequence index
  (no gap -> no -1) up to the specified column.
short_docstring_tokens: Find the last trace value that belongs to a valid sequence index ( no gap - > no - 1 ) up to the specified column .
comment: """
      Find the last trace value that belongs to a valid sequence index
      (no gap -> no -1) up to the specified column.
      """$SEP$# Iterated from column_i back to beyond the beginning$SEP$# and no index has been found$SEP$# -> Terminal gap$SEP$# -> First symbol of sequence has not occured yet$SEP$# -> return -1