from typing import List
from typing import Dict
import re


def person_name_search(
    people_names: List[Dict[str, str]], name_to_find: str
) -> Dict[str, str]:
    """A linear search on List[Dict['firstname', 'lastname']]

    Args:
        people_names (List[Dict[str, str]]): A list of dicts with names.
            Dict keys must include first and lastname as first and second keys.
        name_to_find (str): [description]: A name to find

    Returns:
        Dict[str, str]: The dict with firstname and lastname of empty dict
    """
    for person in people_names:
        firstname, lastname, *_ = person.values()

        if name_to_find == f'{firstname} {lastname}':
            return person

        regex = re.compile(fr'{firstname}\s+{lastname}', flags=re.I)
        if regex.search(name_to_find):
            return person

    return {}