def _determine_toggles(payload, toggles):
 for (toggle, definition) in six.iteritems(toggles):
  if (definition['value'] is not None):
   if (((definition['value'] is True) or (definition['value'] == 'yes')) and (definition['type'] == 'yes_no')):
    payload[toggle] = 'yes'
   elif (((definition['value'] is False) or (definition['value'] == 'no')) and (definition['type'] == 'yes_no')):
    payload[toggle] = 'no'
   if (((definition['value'] is True) or (definition['value'] == 'yes')) and (definition['type'] == 'true_false')):
    payload[toggle] = True
   elif (((definition['value'] is False) or (definition['value'] == 'no')) and (definition['type'] == 'true_false')):
    payload[toggle] = False
 return payload

def _determine_toggles ( payload , toggles ) : for ( toggle , definition ) in six . iteritems ( toggles ) : if ( definition [ 'value' ] is not None ) : if ( ( ( definition [ 'value' ] is True ) or ( definition [ 'value' ] == 'yes' ) ) and ( definition [ 'type' ] == 'yes_no' ) ) : payload [ toggle ] = 'yes' elif ( ( ( definition [ 'value' ] is False ) or ( definition [ 'value' ] == 'no' ) ) and ( definition [ 'type' ] == 'yes_no' ) ) : payload [ toggle ] = 'no' if ( ( ( definition [ 'value' ] is True ) or ( definition [ 'value' ] == 'yes' ) ) and ( definition [ 'type' ] == 'true_false' ) ) : payload [ toggle ] = True elif ( ( ( definition [ 'value' ] is False ) or ( definition [ 'value' ] == 'no' ) ) and ( definition [ 'type' ] == 'true_false' ) ) : payload [ toggle ] = False return payload
bigip cant make up its mind if it likes yes / no or true or false .