def getLoopOrEmpty(loopIndex, loopLayers):
 if ((loopIndex < 0) or (loopIndex >= len(loopLayers))):
  return []
 return loopLayers[loopIndex].loops[0]

def getLoopOrEmpty ( loopIndex , loopLayers ) : if ( ( loopIndex < 0 ) or ( loopIndex >= len ( loopLayers ) ) ) : return [ ] return loopLayers [ loopIndex ] . loops [ 0 ]
get the loop .