def check_ambigous(flowgram, max_allowed=4):
 if (max_allowed < 3):
  raise ValueError('Error in calling check_ambigous. max_allowed should be at least 3')
 count = 0
 for signal in flowgram.flowgram:
  if (signal < 0.5):
   count += 1
   if (count > max_allowed):
    return True
  else:
   count = 0
 return False

def check_ambigous ( flowgram , max_allowed = 4 ) : if ( max_allowed < 3 ) : raise ValueError ( 'Error in calling check_ambigous. max_allowed should be at least 3' ) count = 0 for signal in flowgram . flowgram : if ( signal < 0.5 ) : count += 1 if ( count > max_allowed ) : return True else : count = 0 return False
check if there is a stretch of no-signals .