def _compute_subprefix(attr):
    """
    Get the part before the first '_' or the end of attr including
    the potential '_'
    """
    return "".join((attr.split("_")[0], "_" if len(attr.split("_")) > 1 else ""))