def deserialize_messages(self, data):
    if (data and isinstance(data, six.string_types)):
        return json.loads(data, cls=MessageDecoder)
    return data
def deserialize_messages(self, data):
    if (data and isinstance(data, six.string_types)):
        return json.loads(data, cls=MessageDecoder)
    return data