code: def test_run_traces_batch_api(self):
      run = self._find_run_by_name("Run # 1")
      client = self.client
      requested_traces = [
          {"name": "accuracy", "context": {"is_training": False}},
          {
              "name": "loss",
              "context": {"is_training": True, "subset": "train"},
          },
      ]
      response = client.post(
          f"/api/runs/{run.hash}/metric/get-batch/",
          json=requested_traces,
      )
      self.assertEqual(200, response.status_code)
  
      traces_batch = response.json()
      self.assertEqual(2, len(traces_batch))
      self.assertEqual("accuracy", traces_batch[0]["name"])
      self.assertEqual(100, len(traces_batch[0]["values"]))
      self.assertEqual(False, traces_batch[0]["context"]["is_training"])
  
      self.assertEqual("loss", traces_batch[1]["name"])
      self.assertEqual(100, len(traces_batch[1]["values"]))
      self.assertEqual(True, traces_batch[1]["context"]["is_training"])
      self.assertEqual("train", traces_batch[1]["context"]["subset"])
  
imports: import pytest
  import numpy
  from parameterized import parameterized
  from tests.base import PrefilledDataApiTestBase, ApiTestBase
  from tests.utils import decode_encoded_tree_stream
  from aim.storage.treeutils import decode_tree
  from aim.sdk.run import Run
label_desc: Use image node_id 8 for calling the TestRunApi obj's underlying member method code with example usage: obj.test_run_traces_batch_api() without return types