helper method to process a change batch & encode the bits which need encoding.

def _aws_encode_changebatch(o):
    '''
    helper method to process a change batch & encode the bits which need encoding.
    '''
    change_idx = 0
    while change_idx < len(o['Changes']):
        o['Changes'][change_idx]['ResourceRecordSet']['Name'] = aws_encode(o['Changes'][change_idx]['ResourceRecordSet']['Name'])
        if 'ResourceRecords' in o['Changes'][change_idx]['ResourceRecordSet']:
            rr_idx = 0
            while rr_idx < len(o['Changes'][change_idx]['ResourceRecordSet']['ResourceRecords']):
                o['Changes'][change_idx]['ResourceRecordSet']['ResourceRecords'][rr_idx]['Value'] = aws_encode(o['Changes'][change_idx]['ResourceRecordSet']['ResourceRecords'][rr_idx]['Value'])
                rr_idx += 1
        if 'AliasTarget' in o['Changes'][change_idx]['ResourceRecordSet']:
            o['Changes'][change_idx]['ResourceRecordSet']['AliasTarget']['DNSName'] = aws_encode(o['Changes'][change_idx]['ResourceRecordSet']['AliasTarget']['DNSName'])
        change_idx += 1
    return o