code: def categories_for_actions(actions):
      
      groups = defaultdict(set)
      for action in actions:
          service = action.split(':')[0]
          groups[service].add(_action_categories.get(action))
      return groups
docs: Given an iterable of actions, return a mapping of action groups.
      
      actions: {'ec2:authorizesecuritygroupingress', 'iam:putrolepolicy', 'iam:listroles'}
      
      Returns:
          {
              'ec2': {'Write'},
              'iam': {'Permissions', 'List'})
          }