code: def get_groupaliases(self, hostgroups):
          
          group_aliases = []
          for hostgroup_id in self.hostgroups:
              hostgroup = hostgroups[hostgroup_id]
              group_aliases.append(hostgroup.alias)
          return ','.join(sorted(group_aliases))
docs: Get aliases of the host's hostgroups
  
          :return: comma separated aliases of hostgroups alphabetically sorted
          :rtype: str