from typing import Optional
from typing import Union
from typing import List
from typing import Any


def get_key_str(
    dictionary: dict,
    key: Optional[Union[str, List[str]]],
) -> Any:
    """
    Takes value from dict by key.
    Args:
        dictionary: dict
        key: key

    Returns:
        value
    """
    return dictionary[key]