code: def test_cache_reports_with_content(
      client: TestClient,
      cursor: Optional[str],
      http_status: int,
      error_code: Optional[str],
  ) -> None:
      first_step = processing_graph.get_processing_steps()[0]
      path = first_step.cache_kind
      cursor_str = f"?cursor={cursor}" if cursor else ""
      response = client.request(
          "get", f"/cache-reports-with-content/{path}{cursor_str}"
      )
      assert response.status_code == http_status
      if error_code:
          assert isinstance(response.json()["error"], str)
          assert response.headers["X-Error-Code"] == error_code
      else:
          assert response.json() == {
              "cache_reports_with_content": [],
              "next_cursor": "",
          }
          assert "X-Error-Code" not in response.headers
  
file_path: datasets-server/services/admin/tests/test_app.py
imports: from typing import Optional
  import pytest
  from libcommon.processing_graph import processing_graph
  from starlette.testclient import TestClient
  from admin.app import create_app
label_desc: Use image node_id 8 for calling a global function with example usage: test_cache_reports_with_content(client, cursor, http_status, error_code) without return types