components/policy/tools/template_writers/policy_template_generator.py
def _AddGroups(self, policy_list):
    '''Adds a 'group' field, which is set to be the group's name, to the
       policies that are part of a group.

    Args:
      policy_list: A list of policies and groups whose policies will have a
      'group' field added.
    '''
    groups = [policy for policy in policy_list if policy['type'] == 'group']
    policy_lookup = {
        policy['name']: policy
        for policy in policy_list
        if not IsGroupOrAtomicGroup(policy)
    }
    for group in groups:
      for policy_name in group['policies']:
        policy_lookup[policy_name]['group'] = group['name']
Adds a 'group' field, which is set to be the group's name, to the
       policies that are part of a group.

    Args:
      policy_list: A list of policies and groups whose policies will have a
      'group' field added.
    
Adds a 'group' field, which is set to be the group's name, to the
policies that are part of a group.

A list of policies and groups whose policies will have a
'group' field added.
Adds a ' group ' field which is set to be the group ' s name to the policies that are part of a group . A list of policies and groups whose policies will have a ' group ' field added .
def _AddGroups(self, policy_list):
    groups = [policy for policy in policy_list if policy['type'] == 'group']
    policy_lookup = {
        policy['name']: policy
        for policy in policy_list
        if not IsGroupOrAtomicGroup(policy)
    }
    for group in groups:
      for policy_name in group['policies']:
        policy_lookup[policy_name]['group'] = group['name']
def _AddGroups ( self , policy_list ) : groups = [ policy for policy in policy_list if policy [ 'type' ] == 'group' ] policy_lookup = { policy [ 'name' ] : policy for policy in policy_list if not IsGroupOrAtomicGroup ( policy ) } for group in groups : for policy_name in group [ 'policies' ] : policy_lookup [ policy_name ] [ 'group' ] = group [ 'name' ]
Adds a 'group' field, which is set to be the group's name, to the
policies that are part of a group.
Adds a ' group ' field which is set to be the group ' s name to the policies that are part of a group .
'''Adds a 'group' field, which is set to be the group's name, to the
       policies that are part of a group.

    Args:
      policy_list: A list of policies and groups whose policies will have a
      'group' field added.
    '''
self
policy_list