from typing import Union
from typing import List


def _setting_to_list(setting: Union[str, List[str]]) -> List[str]:
    """Converts a configuration setting to a list.

    The config allows for two ways of specifying some settings, for example samples. A
    single sample is specified as ``"Samples": "ABC"``, a list of samples as
    ``"Samples": ["ABC", "DEF"]``. For consistent treatment, the single sample is
    converted to a list.

    Args:
        setting (Union[str, List[str]]): name of single setting value or list of values

    Returns:
        list: name(s) of sample(s)
    """
    if not isinstance(setting, list):
        setting = [setting]
    return setting