def encoding(encoding):
    valid_encodings = ['plain', 'base64']
    if (encoding not in valid_encodings):
        raise ValueError(('Encoding needs to be one of %r' % valid_encodings))
    return encoding
def encoding(encoding):
    valid_encodings = ['plain', 'base64']
    if (encoding not in valid_encodings):
        raise ValueError(('Encoding needs to be one of %r' % valid_encodings))
    return encoding