def getLoopInsideContainingLoop(containingLoop, loops):
 for loop in loops:
  if (loop != containingLoop):
   if isPathInsideLoop(containingLoop, loop):
    return loop
 return None

def getLoopInsideContainingLoop ( containingLoop , loops ) : for loop in loops : if ( loop != containingLoop ) : if isPathInsideLoop ( containingLoop , loop ) : return loop return None
get a loop that is inside the containing loop .