'Encode any bytes in a list, noting the index of what is encoded.'

def _encode_list(self, data, path):

    new_data = []
    encoded = []
    for (i, value) in enumerate(data):
        new_path = (path + [i])
        (new_value, new_encoded) = self._encode(value, new_path)
        new_data.append(new_value)
        encoded.extend(new_encoded)
    return (new_data, encoded)
