code: def list(
      self,
      service: str,
      resource: str,
      params: dict,
      page_size: int = 1000,
  ) -> List[dict]:
      page_token = None
      output = []
      while True:
          self.get_token()
          resp = self.s.get(
              self.url(service, f"/{resource}"),
              params=omit_none(
                  pageSize=page_size,
                  pageToken=page_token,
                  **params,
              ),
          )
          self.raise_for_status(resp)
          data = resp.json()
          output += data.get(resource, [])
          page_token = data.get("nextPageToken")
          if not page_token:
              break
      return output
  
imports: import time
  from typing import Dict, List, Optional
  import jwt
  import requests
  from dstack._internal.core.backends.nebius.types import ClientError, ConflictError, ForbiddenError, NebiusError, NotFoundError, ResourcesSpec, ServiceAccount
  from dstack._internal.utils.logging import get_logger
label_desc: Use image node_id 17 for calling the NebiusAPIClient obj's underlying member method code with example usage: obj.list(service, resource, params, page_size) and returns: output