code: def test_run_history_keys(
      inject_run, inject_graphql_response, relay_server
  ):
      inject_response = [inject_run()]
      history = [
          {"loss": 0, "acc": 100},
          {"loss": 1, "acc": 0},
      ]
  
      inject_history = inject_graphql_response(
          body=json.dumps(
              {
                  "data": {
                      "project": {
                          "run": {
                              "sampledHistory": [history],
                          },
                      },
                  },
              }
          ),
          query_match_fn=lambda query, _: "query RunSampledHistory("
          in query,
          application_pattern="1",  # apply once and
      )
      inject_response.append(inject_history)
  
      with relay_server(inject=inject_response):
          run = Api().run("test/test/test")
          assert (
              run.history(keys=["acc", "loss"], pandas=False) == history
          )
  
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 16 for calling a global function with example usage: test_run_history_keys(inject_run, inject_graphql_response, relay_server) without return types