from typing import Any
import copy


def sanitize_dictionary(
    target_dict: dict[str, Any], keys: list[str] | tuple[str, ...]
) -> dict[str, Any]:
    """
    Sanitize a dictionary by obfuscating the values of the passed keys.
    """
    return_dict = copy.deepcopy(target_dict)
    for key, value in return_dict.items():
        if isinstance(value, dict):
            return_dict[key] = sanitize_dictionary(return_dict[key], keys)
            continue
        if key in keys:
            return_dict[key] = "******"
    return return_dict