def _authorize_cross_tenant(self, user_id, user_name,
                                tenant_id, tenant_name, roles,
                                allow_names=True):
        tenant_match = [tenant_id, '*']
        user_match = [user_id, '*']
        if allow_names:
            tenant_match = tenant_match + [tenant_name]
            user_match = user_match + [user_name]
        for tenant in tenant_match:
            for user in user_match:
                s = '%s:%s' % (tenant, user)
                if s in roles:
                    return s
        return None
Test that an observed error gets added to the result
dataset/ETHPy150Open openstack/swift/swift/common/middleware/keystoneauth.py/KeystoneAuth._authorize_cross_tenant--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/test/test_log.py/TestObserver.test_error