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