<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_for_dictionary_key(self, logical_id, dictionary, keys):
 """ Checks a dictionary to make sure it has a specific key. If it does not, an InvalidResourceException is thrown. :param string logical_id: logical id of this resource :param dict dictionary: the dictionary to check :param list keys: list of keys that should exist in the dictionary """

        for key in keys:
            if key not in dictionary:
                raise InvalidResourceException(logical_id, 'Resource is missing the required [{}] '
                                                           'property.'.format(key))