code: def _get_user_groups(self, user):
          '''
          Get user groups.
  
          :param user:
          :return:
          '''
          return [g.gr_name for g in grp.getgrall()
                  if user in g.gr_mem] + [grp.getgrgid(pwd.getpwnam(user).pw_gid).gr_namef _get_user_groups(self, user):
          '''
          Get user groups.
  
          :param user:
          :return:
          '''
          return [g.gr_name for g in grp.getgrall()
                  if user in g.gr_mem] + [grp.getgrgid(pwd.getpwnam(user).pw_gid).gr_name]
docs: Get user groups.
  
          :param user:
          :return: