from typing import Union
from typing import Iterable
from typing import Dict
from typing import List


def _to_list(element: Union[None, str, Iterable[str], Dict[str, str]]) -> List[str]:
    """Make a list out of node inputs/outputs.

    Returns:
        List[str]: Node input/output names as a list to standardise.
    """

    if element is None:
        return []
    if isinstance(element, str):
        return [element]
    if isinstance(element, dict):
        return list(element.values())
    return list(element)