def validate_auth_mechanism(option, value):
 if ((value not in MECHANISMS) and (value != 'CRAM-MD5')):
  raise ValueError(('%s must be in %s' % (option, tuple(MECHANISMS))))
 return value

def validate_auth_mechanism ( option , value ) : if ( ( value not in MECHANISMS ) and ( value != 'CRAM-MD5' ) ) : raise ValueError ( ( '%s must be in %s' % ( option , tuple ( MECHANISMS ) ) ) ) return value
validate the authmechanism uri option .