def get_label(trait):
    """Format the trait's label."""
    part = trait["part"] if trait.get("part") else ""
    subpart = trait["subpart"] if trait.get("subpart") else ""
    trait = trait["trait"] if trait["trait"] not in ("part", "subpart") else ""
    return " ".join([p for p in [part, subpart, trait] if p])