def _yield_instance_profiles(conn):
    for resp in _repeat(conn.list_instance_profiles):
        for profile_data in resp['instance_profiles']:
            profile_name = profile_data['instance_profile_name']

            if profile_data['roles']:
                # doesn't look like boto can handle two list markers, hence
                # the extra "member" layer
                role_data = profile_data['roles']['member']
                role_name, role_document = _get_role_name_and_document(
                    role_data)
            else:
                role_name = None
                role_document = None

            yield (profile_name, role_name, role_document)
Yield (profile_name, role_name, role_document).
dataset/ETHPy150Open Yelp/mrjob/mrjob/iam.py/_yield_instance_profiles