code: def _str_subgroups(self):
          
          s = []
  
          i = 0
  
          # if there are any views, there must be a subGroup1 view View tag=val
          # as the first one.  So create it automatically here
          if len(self.views) > 0:
              mapping = dict((i.view, i.view) for i in self.views)
              view_subgroup = SubGroupDefinition(
                  name='view',
                  label='Views',
                  mapping=mapping)
              i += 1
              s.append('subGroup%s %s' % (i, view_subgroup))
  
          for subgroup in self.subgroups.values():
              i += 1
              s.append('subGroup%s %s' % (i, subgroup))
          return s
docs: renders subgroups to a list of strings