<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def keystone_wait_for_propagation(self, sentry_relation_pairs, api_version):
 """Iterate over list of sentry and relation tuples and verify that api_version has the expected value. :param sentry_relation_pairs: list of sentry, relation name tuples used for monitoring propagation of relation data :param api_version: api_version to expect in relation data :returns: None if successful. Raise on error. """

        for (sentry, relation_name) in sentry_relation_pairs:
            rel = sentry.relation('identity-service',
                                  relation_name)
            self.log.debug('keystone relation data: {}'.format(rel))
            if rel.get('api_version') != str(api_version):
                raise Exception("api_version not propagated through relation"
                                " data yet ('{}' != '{}')."
                                "".format(rel.get('api_version'), api_version))