def METHOD_NAME(self, flask_context=False):
    if flask_context:
        url = url_for('correlation.show_correlation', type=self.type, id=self.id)
    else:
        url = f'{baseurl}/correlation/show?type={self.type}&id={self.id}'
    return url