code: def test_group_list_pagination(offset: int, limit: int) -> None:
      # Ensure we have at minimum n groups.
      n = 5
      group_list = det_cmd_json(["user-group", "list", "--json"])[
          "groups"
      ]
      needed_groups = max(n - len(group_list), 0)
  
      with logged_in_user(conf.ADMIN_CREDENTIALS):
          for _ in range(needed_groups):
              det_cmd(
                  ["user-group", "create", get_random_string()],
                  check=True,
              )
  
      # Get baseline group list to compare pagination to.
      group_list = det_cmd_json(["user-group", "list", "--json"])[
          "groups"
      ]
      expected = group_list[offset : offset + limit]
  
      paged_group_list = det_cmd_json(
          [
              "user-group",
              "list",
              "--json",
              "--offset",
              f"{offset}",
              "--limit",
              f"{limit}",
          ]
      )
      assert expected == paged_group_list["groups"]
  
file_path: determined/e2e_tests/tests/cluster/test_groups.py
imports: import json
  import subprocess
  from typing import Any, List
  import pytest
  from tests import config
  from .test_users import get_random_string, logged_in_user
label_desc: Use image node_id 6 for calling a global function with example usage: test_group_list_pagination(offset, limit) without return types