#NEWLINE# def get_prev_step( self , step = None ) : #NEWLINE# #INDENT# '\n        Returns the previous step before the given `step`. If there are no\n        steps available, None will be returned. If the `step` argument is\n        None, the current step will be determined automatically.\n        ' #NEWLINE# if ( step is None ) : #NEWLINE# #INDENT# step = self . steps . current #NEWLINE# #UNINDENT# form_list = self . get_form_list ( ) #NEWLINE# keys = list ( form_list . keys ( ) ) #NEWLINE# key = ( keys . index ( step ) - 1 ) #NEWLINE# if ( key >= 0 ) : #NEWLINE# #INDENT# for prev_step in keys [ key : : ( - 1 ) ] : #NEWLINE# #INDENT# if self . is_step_visible ( prev_step ) : #NEWLINE# #INDENT# return prev_step #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return None