def _validate_single_tenant_and_group(self, security_group_rules):
        sg_groups = set()
        tenants = set()
        for rule_dict in security_group_rules['security_group_rules']:
            rule = rule_dict['security_group_rule']
            sg_groups.add(rule['security_group_id'])
            if len(sg_groups) > 1:
                raise ext_sg.SecurityGroupNotSingleGroupRules()

            tenants.add(rule['tenant_id'])
            if len(tenants) > 1:
                raise ext_sg.SecurityGroupRulesNotSingleTenant()
        return sg_groups.pop()
:type aws_access_key_id: string
dataset/ETHPy150Open openstack/neutron/neutron/db/securitygroups_db.py/SecurityGroupDbMixin._validate_single_tenant_and_group--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/boto-2.38.0/boto/__init__.py/connect_support