def get_step_state(emr_connection, jobflowid, step_name, update=False):
 g.reset_caches()
 steps = get_step_states(emr_connection, jobflowid, _update=update)
 for (name, state, start) in sorted(steps, key=(lambda t: t[2]), reverse=True):
  if (name == step_name):
   return state
 else:
  return NOTFOUND

def get_step_state ( emr_connection , jobflowid , step_name , update = False ) : g . reset_caches ( ) steps = get_step_states ( emr_connection , jobflowid , _update = update ) for ( name , state , start ) in sorted ( steps , key = ( lambda t : t [ 2 ] ) , reverse = True ) : if ( name == step_name ) : return state else : return NOTFOUND
return the state of a step .