code: def test_runs_from_path(user, inject_graphql_response, relay_server):
      num_runs, per_page = 4, 2
      ratio = num_runs // per_page
      summary_metrics = {"acc": 100, "loss": 0}
      group = "A"
      job_type = "test"
      body = {
          "data": {
              "project": {
                  "runCount": num_runs,
                  "runs": {
                      "edges": [
                          {
                              "node": {
                                  "name": f"test_{i}",
                                  "sweepName": None,
                                  "group": group,
                                  "jobType": job_type,
                                  "summaryMetrics": json.dumps(
                                      summary_metrics
                                  ),
                              },
                          }
                          for i in range(ratio)
                      ],
                      "pageInfo": {
                          "hasNextPage": True,
                      },
                  },
              },
          },
      }
      inject_response = inject_graphql_response(
          body=json.dumps(body),
          query_match_fn=lambda query, _: "query Runs(" in query,
          application_pattern="1" * ratio + "2",  # apply once and stop
      )
  
      with relay_server(inject=[inject_response]):
          runs = Api().runs(f"{user}/test", per_page=per_page)
  
          assert len(runs) == 4
          assert len(runs.objects) == 2
          assert runs[0].summary_metrics == summary_metrics
          assert runs[0].group == group
          assert runs[0].job_type == job_type
  
imports: import json
  from typing import Dict, List, Optional
  from unittest import mock
  import pytest
  import requests
  import wandb
  import wandb.apis.public
  import wandb.util
  from wandb import Api
  from wandb.old.summary import Summary
  from wandb.sdk.lib import runid
label_desc: Use image node_id 25 for calling a global function with example usage: test_runs_from_path(user, inject_graphql_response, relay_server) without return types