def encode_dict(dynamizer, value):
    """ Encode a dict for the DynamoDB format """
    encoded_dict = {}
    for k, v in six.iteritems(value):
        encoded_type, encoded_value = dynamizer.raw_encode(v)
        encoded_dict[k] = {
            encoded_type: encoded_value,
        }
    return 'M', encoded_dict
Encode a dict for the DynamoDB format