def override_timeout(timeout, action):
 retval = timeout
 if (action in ['forcemerge', 'snapshot', 'sync_flush']):
  if (timeout == 30):
   if (action in ['forcemerge', 'snapshot']):
    retval = 21600
   elif (action == 'sync_flush'):
    retval = 180
   logger.debug('Overriding default connection timeout for {0} action.  New timeout: {1}'.format(action.upper(), timeout))
 return retval

def override_timeout ( timeout , action ) : retval = timeout if ( action in [ 'forcemerge' , 'snapshot' , 'sync_flush' ] ) : if ( timeout == 30 ) : if ( action in [ 'forcemerge' , 'snapshot' ] ) : retval = 21600 elif ( action == 'sync_flush' ) : retval = 180 logger . debug ( 'Overriding default connection timeout for {0} action.  New timeout: {1}' . format ( action . upper ( ) , timeout ) ) return retval
override the default timeout for forcemerge .