Encode a set for the DynamoDB format

def encode_set(dynamizer, value):
    """ Encode a set for the DynamoDB format """
    inner_value = next(iter(value))
    inner_type = dynamizer.raw_encode(inner_value)[0]
    return inner_type + 'S', [dynamizer.raw_encode(v)[1] for v in value]