def METHOD_NAME(self, topic, data):
    if isinstance(data, list):
        converted_data = []
        for item in data:
            converted_data.append(self._convert_single_item(topic, item))
        return converted_data
    else:
        return self._convert_single_item(topic, data)