def get_full_label(label, doc):
    """
    Return (name,number,file) given a label
    """
    T = doc.labels.get(label, None)
    if not T:
        return "??", "??", ""
    name = doc.label_classes.get(T["class"], T["class"].capitalize())
    number = T["number"] if T["number"] else ""
    file = T["file"] + ".html" if T["file"] != doc.get_metadata("filename", "") else ""
    return name, number, file