from typing import Any
from typing import List
from typing import Dict


def remove_dict_from_list(
    value: Any, target_list: List[Dict[str, Any]], key_name: str
) -> List[Dict[str, Any]]:
    """Remove a dict in list.

    :param value: value to search for and remove
    :type value: Any
    :param target_list: list that needs to be updated
    :type target_list: List[Dict[str, Any]]
    :param key_name: key to match the value
    :type key_name: str
    :return: updated list
    :rtype: list
    """
    return_list = target_list[:]
    for item in target_list:
        if item.get(key_name) == value:
            return_list.remove(item)
    return return_list