def METHOD_NAME(s: str):
    level_mapping = StorageLevel.__members__
    level_strings = [ss.strip() for ss in s.upper().split("|")]
    levels = []
    for ls in level_strings:
        if ls not in level_mapping:  # pragma: no cover
            raise ValueError(f"Unknown level {ls}")
        levels.append(level_mapping[ls])
    return functools.reduce(operator.or_, levels)