def _is_step_running(step):
 return ((getattr(step.status, 'state', None) not in ('CANCELLED', 'INTERRUPTED')) and hasattr(step.status.timeline, 'startdatetime') and (not hasattr(step.status.timeline, 'enddatetime')))

def _is_step_running ( step ) : return ( ( getattr ( step . status , 'state' , None ) not in ( 'CANCELLED' , 'INTERRUPTED' ) ) and hasattr ( step . status . timeline , 'startdatetime' ) and ( not hasattr ( step . status . timeline , 'enddatetime' ) ) )
return true if the given step is currently running .