code: def list_permissions(self, group_name=None, resource=None,
                          url_prefix=None, auth=None, session=None, send_opts=None):
          
          filter_params = {}
          if group_name:
              filter_params["group"] = group_name
  
          if resource:
              filter_params.update(resource.get_dict_route())
  
          req = self.get_permission_request('GET', 'application/json',
                                            url_prefix, auth, query_params=filter_params)
  
          prep = session.prepare_request(req)
          resp = session.send(prep, **send_opts)
          if resp.status_code != 200:
              msg = "Failed to get permission sets. "
              if group_name:
                  msg = "{} Group: {}".format(msg, group_name)
              if resource:
                  msg = "{} Resource: {}".format(msg, resource.name)
  
              msg = '{}, got HTTP response: ({}) - {}'.format(msg, resp.status_code, resp.text)
  
              raise HTTPError(msg, request=req, response=resp)
          else:
              return resp.json()["permission-sets"]
docs: List the permission sets for the logged in user
  
          Optionally filter by resource or group.
  
          Args:
              group_name (string): Name of group to filter on
              resource (intern.resource.boss.BossResource): Identifies which data model object to filter on
              url_prefix (string): Protocol + host such as https://api.theboss.io
              auth (string): Token to send in the request header.
              session (requests.Session): HTTP session to use for request.
              send_opts (dictionary): Additional arguments to pass to session.send().
  
          Returns:
              (list[dict]): List of dictionaries of permission sets