from typing import Dict
from typing import Iterable
from typing import Any


def check_dictionary_keys(dictionary: Dict, required_keys: Iterable[Any], verbose: int = 0) -> bool:
    """
    Check a dictionary for keys given an iterable of keys to check

    Parameters
    ----------
    dictionary : dict
        The dictionary to check
    required_keys : Iterable
        An iterable of keys to check
    verbose : int
        Optional verbose setting. If non-zero, will print out missing keys        

    Returns
    -------
    Boolean
        Return True if all keys present in dictionary else False

    Example
    -------
    test_dict = {
        'A': [1, 1, 1],
        'B': ['foo', 'bar', 'banana'],
        'C': [99.0, 23.5, 68.9]
    }

    print(check_dictionary_keys(test_dict, ['A', 'C']))

    > True
    """
    missing_keys = []
    for key in required_keys:
        if key not in dictionary.keys():
            missing_keys.append(key)
    if missing_keys:
        if verbose > 0:
            print(
                f'Missing keys {missing_keys} not found in dictionary with keys {dictionary.keys()}')
        return False
    else:
        return True