def add(self, visualization):
        """
        Creates a new visualization
        :param visualization: instance of Visualization
        :return:
        """
        res = self.es.create(index=self.index,
                             id=visualization.id or str(uuid.uuid1()),
                             doc_type=self.doc_type,
                             body=visualization.to_kibana(), refresh=True)
        return res
def add ( self , visualization ) : res = self . es . create ( index = self . index , id = visualization . id or str ( uuid . uuid1 ( ) ) , doc_type = self . doc_type , body = visualization . to_kibana ( ) , refresh = True ) return res
Creates a new visualization
        :param visualization: instance of Visualization
        :return: