from typing import Set
import ast


def _h5attr2set(attr: str) -> Set[str]:
    """Convert an HDF5 attribute to a list of strings"""
    if not attr or attr == "set()":
        return set()
    return ast.literal_eval(attr)