from typing import Dict
from typing import List


def get_coord_single_key(
    coord: Dict[str, List[float]], vertical: str, horizontal: str
) -> List[float]:
    """Returns coordinates of a selected corner

    Args:
        coord (Dict[str, List[float]]): Polygon coordinates
        vertical (str): String from ["top", "bottom"] indicating the corner
        horizontal (str): String from ["left", "right"] indicating the corner

    Returns:
        List[float]: [latitude, longitude] coordinates of the corner
    """
    idx_vertical = 1 if vertical == "top" else 0
    idx_horizontal = 0 if horizontal == "top" else 1
    return [coord["lat"][idx_vertical], coord["long"][idx_horizontal]]