def _get_label(obj):
    """
    Return a valid non-placeholder artist label from the artist or a tuple of
    artists destined for a legend. Prefer final artist (drawn last and on top).
    """
    # NOTE: BarContainer and StemContainer are instances of tuple
    while not hasattr(obj, 'get_label') and isinstance(obj, tuple) and len(obj) > 1:
        obj = obj[-1]
    label = getattr(obj, 'get_label', lambda: None)()
    return label if label and label[:1] != '_' else None