def _split_rules(rules):
    split = []
    for rule in rules:
        ip_protocol = rule.get('ip_protocol')
        to_port = rule.get('to_port')
        from_port = rule.get('from_port')
        grants = rule.get('grants')
        for grant in grants:
            _rule = {'ip_protocol': ip_protocol,
                     'to_port': to_port,
                     'from_port': from_port}
            for key, val in six.iteritems(grant):
                _rule[key] = val
            split.append(_rule)
    return split
Split rules with combined grants into individual rules.
dataset/ETHPy150Open saltstack/salt/salt/modules/boto_secgroup.py/_split_rules