from typing import List
from typing import Dict


def _missing_required_keys(
    required_keys: List[str], found_keys: List[str]
) -> Dict[str, str]:
    """Computes an error message indicating missing input keys.

    Arguments:
        required_keys: List of required keys.
        found_keys: List of keys that were found in the input.

    Returns:
        A dictionary with a pre-formatted error message.

    Raises:
        TypeError if either argument is not a list.
        ValueError if all the required keys are present.
    """
    if not isinstance(required_keys, list) and not isinstance(
        found_keys, list
    ):
        raise TypeError("argument must be a list type")

    missing_keys = [key for key in required_keys if key not in found_keys]
    if not missing_keys:
        raise ValueError("there were no missing keys")
    return {
        "msg": "Required field(s) not found",
        "data": (
            f"'{missing_keys}' field(s) not optional. "
            f"Found: {found_keys}.  Required: {required_keys}"
        ),
        "level": "critical",
    }