def _describe_cp(cp):
    label = ('<table class="m-2"><thead><tr><th>Criticality Phenomenon</th><th>' + str(cp.predicate).split('(')[1].replace(')', ''))
    label += '</th></tr></thead><tbody><tr><td>Start time</td><td>'
    time = cp.at_time()
    if isinstance(time, tuple):
        label += str(time[0])
    else:
        label += str(time)
    label += '</td></tr><tr><td>End time</td><td>'
    if isinstance(time, tuple):
        label += str(time[1])
    else:
        label += str(time)
    label += '</td></tr><tr><td>Subject(s)</td><td>'
    if (len(cp.subjects) > 0):
        subj_and_classes = phenomena_extraction.get_most_specific_classes(cp.subjects)
        label += '<br />'.join([(((str(x[0]) + ' (') + ', '.join(x[1])) + ')') for x in subj_and_classes])
    label += '</td></tr><tr><td>Predicate</td><td>'
    label += str(cp.predicate)
    label += '</td></tr><tr><td>Object(s)</td><td>'
    if (len(cp.objects) > 0):
        for obj_predicate in cp.objects.keys():
            obj_and_classes = phenomena_extraction.get_most_specific_classes(cp.objects[obj_predicate])
            label += ((obj_predicate + ':<br/>') + '<br />'.join([(((str(x[0]) + ' (') + ', '.join(x[1])) + ')') for x in obj_and_classes]))
            if (len(cp.objects.keys()) > 1):
                label += '<br/>'
    label += '</td></tr>'
    label += '</tbody></table>'
    return label
def _describe_cp(cp):
    label = ('<table class="m-2"><thead><tr><th>Criticality Phenomenon</th><th>' + str(cp.predicate).split('(')[1].replace(')', ))
    label += '</th></tr></thead><tbody><tr><td>Start time</td><td>'
    time = cp.at_time()
    if isinstance(time, tuple):
        label += str(time[0])
    else:
        label += str(time)
    label += '</td></tr><tr><td>End time</td><td>'
    if isinstance(time, tuple):
        label += str(time[1])
    else:
        label += str(time)
    label += '</td></tr><tr><td>Subject(s)</td><td>'
    if (len(cp.subjects) > 0):
        subj_and_classes = phenomena_extraction.get_most_specific_classes(cp.subjects)
        label += '<br />'.join([(((str(x[0]) + ' (') + ', '.join(x[1])) + ')') for x in subj_and_classes])
    label += '</td></tr><tr><td>Predicate</td><td>'
    label += str(cp.predicate)
    label += '</td></tr><tr><td>Object(s)</td><td>'
    if (len(cp.objects) > 0):
        for obj_predicate in cp.objects.keys():
            obj_and_classes = phenomena_extraction.get_most_specific_classes(cp.objects[obj_predicate])
            label += ((obj_predicate + ':<br/>') + '<br />'.join([(((str(x[0]) + ' (') + ', '.join(x[1])) + ')') for x in obj_and_classes]))
            if (len(cp.objects.keys()) > 1):
                label += '<br/>'
    label += '</td></tr>'
    label += '</tbody></table>'
    return label