def getProcedures(procedure, text):
 craftSequence = getReadCraftSequence()
 sequenceIndexFromProcedure = 0
 if (procedure in craftSequence):
  sequenceIndexFromProcedure = craftSequence.index(procedure)
 craftSequence = craftSequence[:(sequenceIndexFromProcedure + 1)]
 for craftSequenceIndex in xrange((len(craftSequence) - 1), (-1), (-1)):
  procedure = craftSequence[craftSequenceIndex]
  if gcodec.isProcedureDone(text, procedure):
   return craftSequence[(craftSequenceIndex + 1):]
 return craftSequence

def getProcedures ( procedure , text ) : craftSequence = getReadCraftSequence ( ) sequenceIndexFromProcedure = 0 if ( procedure in craftSequence ) : sequenceIndexFromProcedure = craftSequence . index ( procedure ) craftSequence = craftSequence [ : ( sequenceIndexFromProcedure + 1 ) ] for craftSequenceIndex in xrange ( ( len ( craftSequence ) - 1 ) , ( - 1 ) , ( - 1 ) ) : procedure = craftSequence [ craftSequenceIndex ] if gcodec . isProcedureDone ( text , procedure ) : return craftSequence [ ( craftSequenceIndex + 1 ) : ] return craftSequence
get the procedures up to and including the given procedure .