from typing import Union
from typing import Any
from typing import Sequence
from typing import Set
from enum import Enum
from typing import Iterable


def _to_string_set(item: Union[Any, Sequence[Any]]) -> Set[str]:
    """
    Convert ``item`` to a `str` set.

    Parameters
    ----------
    item
        Item to convert. If it's not a sequence, it will be made into singleton.

    Returns
    -------
    :class:`set`
        Set of `str`.
    """
    if isinstance(item, (str, Enum)) or not isinstance(item, Iterable):
        item = (item,)
    return set({str(i.value if isinstance(i, Enum) else i) for i in item})